IMP Reference Guide
2.5.0
The Integrative Modeling Platform
|
#include <IMP/cache.h>
This is a helper class for writing memoizers: things that store the results of a computation to look up later. The result type must support
operator=
operator==
Public Types | |
typedef Generator::argument_type | Key |
typedef Generator::result_type | Value |
Public Member Functions | |
Memoizer (const Generator &gen, const Checker &checker=Checker()) | |
Generator & | access_generator () |
const Value & | get () const |
const Generator & | get_generator () const |
double | get_hit_rate () const |
void | reset () |
void | set (const Value &v) const |
Update the stored result manually. More... | |
void IMP::Memoizer< Generator, Checker >::set | ( | const Value & | v | ) | const |