13#if !defined(VITA_CACHE_H)
16#include <shared_mutex>
34 DISALLOW_COPY_AND_ASSIGN(
cache);
36 explicit cache(
unsigned);
48 bool load(std::istream &);
49 bool save(std::ostream &)
const;
53 std::size_t index(
const hash_t &)
const;
66 mutable std::shared_mutex mutex_;
68 const std::uint64_t k_mask;
69 std::vector<slot> table_;
70 decltype(slot::seal) seal_;
Implements a hash table that links individuals' signature to fitness (mainly used by the evaluator_pr...
cache(unsigned)
Creates a new hash table.
void clear()
Clears the content and the statistical informations of the table.
const fitness_t & find(const hash_t &) const
Looks for the fitness of an individual in the transposition table.
void insert(const hash_t &, const fitness_t &)
Stores fitness information in the transposition table.
bool save(std::ostream &) const
bool load(std::istream &)
MurmurHash3 (https://github.com/aappleby/smhasher) by Austin Appleby.
The main namespace for the project.
A 128bit unsigned integer used as individual's signature / hash table look-up key.