Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further fixed hash function #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

KPJoshi
Copy link
Contributor

@KPJoshi KPJoshi commented Apr 9, 2018

Since LONG_PRIME is larger than the maximum integer, and for uniformity, the hash coefficients must be chosen in the range [1,LONG_PRIME-1], it was necessary to make the hashes array into an array of unsigned longs. I also fixed the method in which values were inserted into this array: the new code properly generates values in the range [1,LONG_PRIME-1] as is expected for this kind of hash function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant