Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int _cuckooHash(TKey key, int whichHashFunction)
- {
- if (whichHashFunction <= 0 || whichHashFunction > _universalHashingFamily.NumberOfFunctions)
- throw new ArgumentOutOfRangeException("Which Hash Function parameter must be betwwen 1 and " + NUMBER_OF_HASH_FUNCTIONS + ".");
- int hashCode = Math.Abs(_universalHashingFamily.UniversalHash(_equalityComparer.GetHashCode(key), whichHashFunction));
- return hashCode % _collection.Length;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement