[#BloombergLP-bslh-FibonacciBadHashWrapper] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslh.adoc[bslh]::FibonacciBadHashWrapper :relfileprefix: ../../ :mrdocs: This class provides a hash algorithm wrapper that improves the distribution of varying bits from the `HASH` applied to the `KEY`. == Synopsis Declared in `<bslh_fibonaccibadhashwrapper.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class HASH> class FibonacciBadHashWrapper; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslh/FibonacciBadHashWrapper/2constructor-00.adoc[`FibonacciBadHashWrapper`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslh/FibonacciBadHashWrapper/operator_call.adoc[`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`. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslh/FibonacciBadHashWrapper/k_FIBONACCI_HASH_MULTIPLIER.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#