Class CarterWegmanHash
Defined in File UniversalHashing.h
Class Documentation
-
class CarterWegmanHash
h( k ) = ( ( a k + b ) mod p ) mod m, of the class H_{p,m}
Public Functions
-
explicit CarterWegmanHash(std::uint64_t m, std::uint64_t seed = 1)
a function drawn from H_{p,m} with p = 2^61 - 1, from the seed
- Pre:
m >= 1
-
CarterWegmanHash(std::uint64_t p, std::uint64_t a, std::uint64_t b, std::uint64_t m)
the function of the given parameters
- Pre:
2 <= p < 2^63, 1 <= a < p, b < p and m >= 1
-
std::uint64_t operator()(std::uint64_t k) const
- Pre:
k < p
- Post:
the result is below m
-
inline std::uint64_t p(void) const
-
inline std::uint64_t a(void) const
-
inline std::uint64_t b(void) const
-
inline std::uint64_t m(void) const
-
explicit CarterWegmanHash(std::uint64_t m, std::uint64_t seed = 1)