The indice of the hash function we want to produce
The result of the first hash function applied to a value.
The result of the second hash function applied to a value.
The size of the datastructures associated to the hash context (ex: the size of a Bloom Filter)
The result of hash_n applied to a value.
Generate a set of distinct indexes on interval [0, size) using the double hashing technique
For generating efficiently distinct indexes we re-hash after detecting a cycle by changing slightly the seed.
It has the effect of generating faster distinct indexes without loosing entirely the utility of the double hashing.
For small number of indexes it will work perfectly. For a number close to the size, and size very large
Advise: do not generate size
indexes for a large interval. In practice, size should be equal
to the number of hash functions used and is often low.
The element to hash
the range on which we can generate an index [0, size) = size
The number of indexes desired
The seed used
Array
Generate N indexes on range [0, size) It uses the double hashing technique to generate the indexes. It hash twice the value only once before generating the indexes. Warning: you can have a lot of modulo collisions.
The element to hash
The range on which we can generate the index, exclusive
The number of indexes we want
An array of indexes on range [0, size)
Hash an item as an unsigned int
Element to hash
The hash seed. If its is UINT32 make sure to set the length to 32
The hash value as an unsigned int
Hash an item and return its number and HEX string representation
Element to hash
The hash seed. If its is UINT32 make sure to set the length to 32
The item hased as an int and a string
(64-bits only) Hash a value into two values (in hex or integer format)
The value to hash
the seed used for hashing
The results of the hash functions applied to the value (in hex or integer)
Hash twice an element into their HEX string representations
TwoHashesTemplated
(64-bits only) Same as hashTwice but return Numbers and String equivalent
the value to hash
the seed to change when hashing
TwoHashesIntAndString
A 64bits floating point {@link Number}
Generated using TypeDoc
Apply enhanced Double Hashing to produce a n-hash
http://peterd.org/pcd-diss.pdf s6.5.4
Hashing
Thomas Minier
Arnaud Grall