64#ifndef __ADS_HashFunctions
65 #define __ADS_HashFunctions
93unsigned bin_bit( std::string_view k , std::size_t j );
98std::uint64_t
int_bin( std::string_view k );
133std::uint64_t
hash_xor( std::string_view k ,
int p );
160 std::uint64_t base = 256 ,
161 std::uint64_t seed = 0 );
171 long double C = ( std::sqrt( 5.0L ) - 1 ) /
220#include "ADS/dictionary/impl/HashFunctions.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
std::uint64_t hash_multiplication(std::uint64_t i, std::uint64_t m, long double C=(std::sqrt(5.0L) - 1)/2)
the multiplication in floating point, the formula of the book, : exact only while keeps enough digit...
unsigned bin_bit(std::string_view k, std::size_t j)
the bit of place of , counted from the left; 0 past the end
std::uint64_t int_bin(std::string_view k)
of a key of at most 8 characters
std::uint64_t hash_division(std::string_view k, std::uint64_t m, std::uint64_t base=256, std::uint64_t seed=0)
the division by the rule of Horner in the given base, each character being a digit,...
std::uint64_t hash_xor(std::string_view k, int p)
the XOR of the blocks of bits of , the last one padded with zeros on the right
std::uint64_t hash_midsquare(std::uint64_t i, int p)
the middle square: the bits in the middle of the 64 least significant ones of
std::uint64_t hash_extraction(std::string_view k, int p, std::size_t s)
the extraction: the bits of from the place on, counted from the left, as an integer in
std::uint64_t hash_fibonacci(std::uint64_t i, int p)
the multiplication with integers for , : the most significant bits of the 64 least significant ones ...