IMP Reference Guide
2.6.2
The Integrative Modeling Platform
|
#include <IMP/cache.h>
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:
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 |