|
ADS
Algorithms and Data Structures
|
\( h( k ) = ( a k \bmod 2^h ) \operatorname{div} 2^{h - l} \), with \( a \) odd More...
#include <ADS/dictionary/UniversalHashing.h>
Public member functions | |
| MultiplyShiftHash (int h, int l, std::uint64_t seed=1) | |
| a function with a random odd \( a \), from the seed | |
| std::uint64_t | operator() (std::uint64_t k) const |
| \( h( k ) \), a product and a shift | |
Static public member functions | |
| static MultiplyShiftHash | ofMultiplier (int h, int l, std::uint64_t a) |
| the function of the multiplier \( a \) | |
\( h( k ) = ( a k \bmod 2^h ) \operatorname{div} 2^{h - l} \), with \( a \) odd
| ADS::MultiplyShiftHash::MultiplyShiftHash | ( | int | h, |
| int | l, | ||
| std::uint64_t | seed = 1 ) |
a function with a random odd \( a \), from the seed
|
staticnodiscard |
the function of the multiplier \( a \)
|
nodiscard |
\( h( k ) \), a product and a shift