This class provides a hash algorithm wrapper that improves the distribution of varying bits from the HASH applied to the KEY.
Declared in <bslh_fibonaccibadhashwrapper.h>
template<class HASH>
class FibonacciBadHashWrapper;
| Name | Description |
|---|---|
FibonacciBadHashWrapper [constructor] | Constructors |
operator() | Return the hash of the specified key, computed as the product of the result of the hash function supplied at construction and k_FIBONACCI_HASH_MULTIPLIER. |
| Name | Description |
|---|---|
k_FIBONACCI_HASH_MULTIPLIER | The value corresponds to: ` 2^64 / phi - 1 ` where phi is the Golden Ratio and 1 is subtracted to avoid the value being a multiple of 2 (that would throw away one bit of information from the resultant hash value). See https://en.wikipedia.org/wiki/Hash_function#Fibonacci_hashing. |