Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Static Public Attributes

bslh::FibonacciBadHashWrapper< HASH > Class Template Reference

#include <bslh_fibonaccibadhashwrapper.h>

List of all members.

Public Member Functions

 FibonacciBadHashWrapper ()
 FibonacciBadHashWrapper (const HASH &hash)
 FibonacciBadHashWrapper (const FibonacciBadHashWrapper &original)
 ~FibonacciBadHashWrapper ()
FibonacciBadHashWrapperoperator= (const FibonacciBadHashWrapper &rhs)
template<class KEY >
size_t operator() (const KEY &key) const

Static Public Attributes

static const bsls::Types::Uint64 k_FIBONACCI_HASH_MULTIPLIER = 11400714819323198485ull

Detailed Description

template<class HASH>
class bslh::FibonacciBadHashWrapper< HASH >

This class provides a hash algorithm wrapper that improves the distribution of varying bits from the HASH applied to the KEY.

See Component bslh_fibonaccibadhashwrapper


Constructor & Destructor Documentation

template<class HASH>
bslh::FibonacciBadHashWrapper< HASH >::FibonacciBadHashWrapper (  ) 

Create a FibonacciBadHashWrapper having a default constructed hash.

template<class HASH>
bslh::FibonacciBadHashWrapper< HASH >::FibonacciBadHashWrapper ( const HASH &  hash  )  [explicit]

Create a FibonacciBadHashWrapper having the specified hash.

template<class HASH>
bslh::FibonacciBadHashWrapper< HASH >::FibonacciBadHashWrapper ( const FibonacciBadHashWrapper< HASH > &  original  ) 

Create a FibonacciBadHashWrapper object having the value of the specified original object.

template<class HASH>
bslh::FibonacciBadHashWrapper< HASH >::~FibonacciBadHashWrapper (  ) 

Destroy this object.


Member Function Documentation

template<class HASH>
FibonacciBadHashWrapper& bslh::FibonacciBadHashWrapper< HASH >::operator= ( const FibonacciBadHashWrapper< HASH > &  rhs  ) 

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

template<class HASH>
template<class KEY >
size_t bslh::FibonacciBadHashWrapper< HASH >::operator() ( const KEY &  key  )  const

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.


Member Data Documentation

template<class HASH>
const bsls::Types::Uint64 bslh::FibonacciBadHashWrapper< HASH >::k_FIBONACCI_HASH_MULTIPLIER = 11400714819323198485ull [static]

The documentation for this class was generated from the following file: