Class ZobristTable
Defined in File RandomHashing.h
Class Documentation
-
class ZobristTable
a random word for each pair ( feature , value )
Public Functions
-
ZobristTable(std::size_t n, std::size_t m, std::uint64_t seed = 1)
the words of n features with m values each, from the seed
- Pre:
n >= 1 and m >= 1
-
std::uint64_t operator()(std::size_t f, std::size_t v) const
the word of the feature f with the value v
- Pre:
f < n and v < m
-
template<class V>
std::uint64_t hash(const std::vector<V> &S) const the hash of a state, the value of each feature by its place in S
- Pre:
S has n values, each below m
-
std::uint64_t update(std::uint64_t h, std::size_t f, std::size_t a, std::size_t b) const
the hash h of a state after the feature f changes from a to b
- Pre:
f < n , a < m and b < m
-
ZobristTable(std::size_t n, std::size_t m, std::uint64_t seed = 1)