Skip to content

Further fixed hash function#3

Open
KPJoshi wants to merge 1 commit intoalabid:masterfrom
KPJoshi:hash-fix-2
Open

Further fixed hash function#3
KPJoshi wants to merge 1 commit intoalabid:masterfrom
KPJoshi:hash-fix-2

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