ngramcache Class Reference

#include <ngramcache.h>

Collaboration diagram for ngramcache:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int cursize ()
int maxsize ()
 ngramcache (int n, int size, int maxentries)
char * get (const int *ngp, char *info=NULL)
 ~ngramcache ()
void reset (int n=0)
int add (const int *ngp, const char *info)
int isfull ()
void stat ()


Detailed Description

Definition at line 29 of file ngramcache.h.


Constructor & Destructor Documentation

ngramcache::ngramcache ( int  n,
int  size,
int  maxentries 
)

Definition at line 38 of file ngramcache.cpp.

References INT, and NULL.

ngramcache::~ngramcache (  ) 

Definition at line 49 of file ngramcache.cpp.


Member Function Documentation

int ngramcache::add ( const int *  ngp,
const char *  info 
)

Definition at line 81 of file ngramcache.cpp.

References mempool::allocate(), HT_ENTER, and htable::search().

Referenced by lmtable::clprob(), lmmacro::clprob(), lmtable::cmaxsuffptr(), and lmtable::get().

Here is the call graph for this function:

Here is the caller graph for this function:

int ngramcache::cursize (  )  [inline]

Definition at line 42 of file ngramcache.h.

Referenced by lmtable::check_cache_levels(), and lmtable::reset_caches().

Here is the caller graph for this function:

char * ngramcache::get ( const int *  ngp,
char *  info = NULL 
)

Definition at line 69 of file ngramcache.cpp.

References HT_FIND, and htable::search().

Referenced by lmtable::clprob(), lmmacro::clprob(), and lmtable::cmaxsuffptr().

Here is the call graph for this function:

Here is the caller graph for this function:

int ngramcache::isfull (  )  [inline]

Definition at line 49 of file ngramcache.h.

Referenced by lmtable::check_cache_levels().

Here is the caller graph for this function:

int ngramcache::maxsize (  )  [inline]

Definition at line 43 of file ngramcache.h.

Referenced by lmtable::reset_caches().

Here is the caller graph for this function:

void ngramcache::reset ( int  n = 0  ) 

Definition at line 57 of file ngramcache.cpp.

References INT, and NULL.

Referenced by lmtable::check_cache_levels(), and lmtable::reset_caches().

Here is the caller graph for this function:

void ngramcache::stat (  ) 

Definition at line 92 of file ngramcache.cpp.


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

Generated on Fri Apr 15 13:04:15 2011 for Moses by  doxygen 1.5.9