/disk4/html/www/moses/doxygen/irstlm/trunk/src/lmtable.h File Reference

#include <sys/types.h>
#include <sys/mman.h>
#include <math.h>
#include <cstdlib>
#include <string>
#include <set>
#include <limits>
#include "util.h"
#include "ngramcache.h"
#include "dictionary.h"
#include "n_gram.h"
#include "lmContainer.h"

Go to the source code of this file.

Classes

class  lmtable

Defines

#define MAX(a, b)   (((a)>(b))?(a):(b))
#define MIN(a, b)   (((a)<(b))?(a):(b))
#define LMTMAXLEV   20
#define MAX_LINE   100000
#define LMTCODESIZE   (int)3
#define SHORTSIZE   (int)2
#define PTRSIZE   (int)sizeof(char *)
#define INTSIZE   (int)4
#define CHARSIZE   (int)1
#define PROBSIZE   (int)4
#define QPROBSIZE   (int)1
#define BOUNDSIZE   (int)sizeof(table_entry_pos_t)
#define UNIGRAM_RESOLUTION   10000000.0
#define BOUND_EMPTY1   (numeric_limits<table_entry_pos_t>::max() - 2)
#define BOUND_EMPTY2   (numeric_limits<table_entry_pos_t>::max() - 1)

Typedefs

typedef char * node
typedef unsigned int table_entry_pos_t
typedef unsigned long table_pos_t
typedef unsigned char qfloat_t

Enumerations

enum  LMT_TYPE { INTERNAL, QINTERNAL, LEAF, QLEAF }
enum  LMT_ACTION { LMT_FIND, LMT_ENTER, LMT_INIT, LMT_CONT }


Define Documentation

#define BOUND_EMPTY1   (numeric_limits<table_entry_pos_t>::max() - 2)

#define BOUND_EMPTY2   (numeric_limits<table_entry_pos_t>::max() - 1)

Definition at line 82 of file lmtable.h.

#define BOUNDSIZE   (int)sizeof(table_entry_pos_t)

Definition at line 61 of file lmtable.h.

Referenced by lmtable::nodesize().

#define CHARSIZE   (int)1

Definition at line 56 of file lmtable.h.

Referenced by ngramtable::loadbin(), ngramtable::savebin(), and tabletype::tabletype().

#define INTSIZE   (int)4

#define LMTCODESIZE   (int)3

#define LMTMAXLEV   20

Definition at line 46 of file lmtable.h.

Referenced by lmtable::lmtable(), and parseline().

#define MAX ( a,
 )     (((a)>(b))?(a):(b))

#define MAX_LINE   100000

#define MIN ( a,
 )     (((a)<(b))?(a):(b))

Definition at line 44 of file lmtable.h.

Referenced by lmtable::lprob(), and lmtable::maxsuffptr().

#define PROBSIZE   (int)4

Definition at line 58 of file lmtable.h.

Referenced by lmtable::bound(), lmtable::bow(), and lmtable::nodesize().

#define PTRSIZE   (int)sizeof(char *)

Definition at line 54 of file lmtable.h.

Referenced by ngramtable::mtable(), and tabletype::tabletype().

#define QPROBSIZE   (int)1

Definition at line 59 of file lmtable.h.

Referenced by lmtable::bound(), lmtable::bow(), and lmtable::nodesize().

#define SHORTSIZE   (int)2

Definition at line 53 of file lmtable.h.

#define UNIGRAM_RESOLUTION   10000000.0

Definition at line 63 of file lmtable.h.

Referenced by lmtable::lprob(), and lmtable::lprobx().


Typedef Documentation

typedef char* node

Definition at line 67 of file lmtable.h.

typedef unsigned char qfloat_t

Definition at line 77 of file lmtable.h.

typedef unsigned int table_entry_pos_t

Definition at line 75 of file lmtable.h.

typedef unsigned long table_pos_t

Definition at line 76 of file lmtable.h.


Enumeration Type Documentation

enum LMT_ACTION

Enumerator:
LMT_FIND  search: find an entry
LMT_ENTER  search: enter an entry
LMT_INIT  scan: start scan
LMT_CONT  scan: continue scan

Definition at line 69 of file lmtable.h.

enum LMT_TYPE

Enumerator:
INTERNAL 
QINTERNAL 
LEAF 
QLEAF 

Definition at line 65 of file lmtable.h.


Generated on Thu Jul 6 00:31:23 2017 for Moses by  doxygen 1.5.9