QCDLoop
One-loop scalar Feynman integrals
All Classes Namespaces Functions Pages
Public Types | Public Member Functions | List of all members
ql::LRUCache< Tkey, Tvalue > Class Template Reference

The LRU Cache class. More...

#include <cache.h>

Public Types

typedef std::pair< Tkey, Tvalue > key_value_pair_t
 
typedef std::list< key_value_pair_t >::iterator list_iterator_t
 

Public Member Functions

 LRUCache (int const &size=1)
 LRUCache constructor. More...
 
 LRUCache (const LRUCache &obj)
 
void setCacheSize (int const &size)
 Set the Cache size.
 
int const & getCacheSize () const
 Get the Cache size.
 
void store (Tkey const &key, Tvalue const &value)
 Store the cached data.
 
bool get (Tkey const &key, Tvalue &out)
 Get the cached data.
 

Detailed Description

template<typename Tkey, typename Tvalue>
class ql::LRUCache< Tkey, Tvalue >

The LRU Cache class.

Implements the LRU algorithm for caching.

Constructor & Destructor Documentation

template<typename Tkey , typename Tvalue >
ql::LRUCache< Tkey, Tvalue >::LRUCache ( int const &  size = 1)

LRUCache constructor.

Parameters
sizethe caching size

The LRU Cache constructor


The documentation for this class was generated from the following files: