Vita
|
Implements a hash table that links individuals' signature to fitness (mainly used by the evaluator_proxy class). More...
#include <cache.h>
Public Member Functions | |
cache (unsigned) | |
Creates a new hash table. More... | |
void | clear () |
Clears the content and the statistical informations of the table. More... | |
void | clear (const hash_t &) |
Clears the cached information for a specific individual. More... | |
DISALLOW_COPY_AND_ASSIGN (cache) | |
const fitness_t & | find (const hash_t &) const |
Looks for the fitness of an individual in the transposition table. More... | |
void | insert (const hash_t &, const fitness_t &) |
Stores fitness information in the transposition table. More... | |
bool | is_valid () const |
bool | load (std::istream &) |
bool | save (std::ostream &) const |
Implements a hash table that links individuals' signature to fitness (mainly used by the evaluator_proxy class).
During the evolution semantically equivalent (but syntactically distinct) individuals are often generated and cache can give a significant speed improvement avoiding the recalculation of shared information.
|
explicit |
void vita::cache::clear | ( | ) |
void vita::cache::clear | ( | const hash_t & | h | ) |
bool vita::cache::is_valid | ( | ) | const |
bool vita::cache::load | ( | std::istream & | in | ) |
bool vita::cache::save | ( | std::ostream & | out | ) | const |