IMP
2.2.1
The Integrative Modeling Platform
|
#include <IMP/base/cache.h>
Public Types | |
typedef OrderIterator | ContentIterator |
typedef Generator::argument_type | Key |
typedef Generator::result_type | Value |
Public Member Functions | |
LRUCache (const Generator &gen, unsigned int size, const Checker checker=Checker()) | |
Generator & | access_generator () |
ContentIterator | contents_begin () const |
ContentIterator | contents_end () const |
Value | get (const Key &k) const |
const Generator & | get_generator () const |
double | get_hit_rate () const |
Vector< Key > | get_keys () const |
void | insert (Key k, Value v) |
unsigned int | size () const |
Implement a simple least recently used cache. As with the Memoizer, it is parameterized by a generator that is used to generate values if they are not in the cache.
The Generator should have a method:
Definition at line 254 of file base/cache.h.