![]() |
Cadabra
Computer algebra system for field theory problems
|
#include <lru_cache.hh>
Public Types | |
| using | value_type = std::pair<Key, Value> |
| using | List = std::list<value_type> |
| using | iterator = typename List::iterator |
| using | const_iterator = typename List::const_iterator |
| using | size_type = size_t |
Public Member Functions | |
| LRUcache (size_t capacity) | |
| void | touch (iterator &it) |
| Value & | at (const Key &key, bool touching=true) |
| void | insert (const Key &key, const Value &value) |
| Value & | operator[] (const Key &key) |
| iterator | find (const Key &key, bool touching=true) |
| bool | contains (const Key &key, bool touching=true) |
| size_t | erase (const Key &key) |
| iterator | erase (const_iterator &it) |
| iterator | erase (iterator &it) |
| void | clear () |
| bool | empty () const |
| size_t | size () const |
| void | resize (size_t new_size) |
| iterator | begin () |
| iterator | end () |
Private Member Functions | |
| void | evict () |
Private Attributes | |
| List | cache_list |
| std::map< Key, iterator, Compare > | cache_lookup |
| size_t | max_size |
| using LRUcache< Key, Value, Compare >::const_iterator = typename List::const_iterator |
| using LRUcache< Key, Value, Compare >::iterator = typename List::iterator |
| using LRUcache< Key, Value, Compare >::List = std::list<value_type> |
| using LRUcache< Key, Value, Compare >::size_type = size_t |
| using LRUcache< Key, Value, Compare >::value_type = std::pair<Key, Value> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |