#include <ngramcache.h>

Public Member Functions | |
| ngramcache (int n, int size, int maxentries, float lf=NGRAMCACHE_LOAD_FACTOR) | |
| ~ngramcache () | |
| int | cursize () |
| int | maxsize () |
| void | reset (int n=0) |
| char * | get (const int *ngp, char *&info) |
| char * | get (const int *ngp, double &info) |
| char * | get (const int *ngp, prob_and_state_t &info) |
| int | add (const int *ngp, const char *&info) |
| int | add (const int *ngp, const double &info) |
| int | add (const int *ngp, const prob_and_state_t &info) |
| int | isfull () |
| void | stat () |
| void | used () |
| float | set_load_factor (float value) |
Definition at line 46 of file ngramcache.h.
| ngramcache::ngramcache | ( | int | n, | |
| int | size, | |||
| int | maxentries, | |||
| float | lf = NGRAMCACHE_LOAD_FACTOR | |||
| ) |
| ngramcache::~ngramcache | ( | ) |
Definition at line 62 of file ngramcache.cpp.
| int ngramcache::add | ( | const int * | ngp, | |
| const prob_and_state_t & | info | |||
| ) |
Definition at line 144 of file ngramcache.cpp.
References mempool::allocate(), and htable< T >::insert().

| int ngramcache::add | ( | const int * | ngp, | |
| const double & | info | |||
| ) |
Definition at line 133 of file ngramcache.cpp.
References mempool::allocate(), and htable< T >::insert().

| int ngramcache::add | ( | const int * | ngp, | |
| const char *& | info | |||
| ) |
Definition at line 122 of file ngramcache.cpp.
References mempool::allocate(), and htable< T >::insert().

| int ngramcache::cursize | ( | ) | [inline] |
Definition at line 67 of file ngramcache.h.
| char * ngramcache::get | ( | const int * | ngp, | |
| prob_and_state_t & | info | |||
| ) |
Definition at line 109 of file ngramcache.cpp.
References htable< T >::find().

| char * ngramcache::get | ( | const int * | ngp, | |
| double & | info | |||
| ) |
Definition at line 96 of file ngramcache.cpp.
References htable< T >::find().

| char * ngramcache::get | ( | const int * | ngp, | |
| char *& | info | |||
| ) |
Definition at line 83 of file ngramcache.cpp.
References htable< T >::find().

| int ngramcache::isfull | ( | ) | [inline] |
Definition at line 80 of file ngramcache.h.
| int ngramcache::maxsize | ( | ) | [inline] |
Definition at line 70 of file ngramcache.h.
| void ngramcache::reset | ( | int | n = 0 |
) |
| float ngramcache::set_load_factor | ( | float | value | ) | [inline] |
Definition at line 88 of file ngramcache.h.
| void ngramcache::stat | ( | ) |
Definition at line 156 of file ngramcache.cpp.
References mempool::used(), htable< T >::used(), and mempool::wasted().
Referenced by used().


| void ngramcache::used | ( | ) | [inline] |
Definition at line 84 of file ngramcache.h.
References stat().

1.5.9