Public Member Functions | Private Member Functions | Private Attributes

BNgram Class Reference

#include <BNGram.h>

Collaboration diagram for BNgram:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BNgram (unsigned long, unsigned long)
 ~BNgram ()
void beginSeq (short int, short int=1)
void addSymb (short int, short int=1)
void endSeq (short int=1)
void show (ostream &)

Private Member Functions

void _freeTree (BNgramNode *)
BNgramNode_new ()
void _add (short int, bool, short int)
BNgramNode_newNode (short int, BNgramNode *)
BNgramNode_findInsert (BNgramNode *, short int)
void _show (BNgramNode *, String, ostream &)

Private Attributes

unsigned long _totalCount
short int _maxLength
unsigned long * _circArray
unsigned long _readIdx
short int _nbElt
BNgramNode_seed

Detailed Description

Definition at line 72 of file BNGram.h.


Constructor & Destructor Documentation

BNgram::BNgram ( unsigned long  maxLength,
unsigned long  nbElementByNode = 100 
)

Definition at line 125 of file BNGram.cpp.

References _circArray, _maxLength, _nbElt, _newNode(), _readIdx, _seed, and _totalCount.

BNgram::~BNgram (  )

Definition at line 134 of file BNGram.cpp.

References _circArray, _freeTree(), and _seed.


Member Function Documentation

void BNgram::_add ( short int  symb,
bool  first,
short int  nb = 1 
) [private]

Definition at line 87 of file BNGram.cpp.

References _findInsert(), _nbElt, _newNode(), _seed, _totalCount, BNgramNode::child, BNgramNode::count, and debug.

Referenced by addSymb(), and endSeq().

BNgramNode * BNgram::_findInsert ( BNgramNode ptr,
short int  idx 
) [private]

Definition at line 79 of file BNGram.cpp.

References _nbElt, _newNode(), BNgramNode::brother, and BNgramNode::idx.

Referenced by _add().

void BNgram::_freeTree ( BNgramNode seed ) [private]

Definition at line 107 of file BNGram.cpp.

References _nbElt, BNgramNode::child, and BNgramNode::count.

Referenced by ~BNgram().

BNgramNode* BNgram::_new (  ) [private]
BNgramNode * BNgram::_newNode ( short int  symb,
BNgramNode br = NULL 
) [private]

Definition at line 70 of file BNGram.cpp.

References _nbElt, BNgramNode::brother, BNgramNode::child, BNgramNode::count, and BNgramNode::idx.

Referenced by _add(), _findInsert(), and BNgram().

void BNgram::_show ( BNgramNode seed,
String  ngramS = "",
ostream &  str = cout 
) [private]

Definition at line 114 of file BNGram.cpp.

References _maxLength, and BNgramNode::brother.

Referenced by show().

void BNgram::addSymb ( short int  symb,
short int  nb = 1 
)

Definition at line 142 of file BNGram.cpp.

References _add(), _circArray, _maxLength, and _readIdx.

Referenced by SequenceDecoder::decode(), and testBNgram().

void BNgram::beginSeq ( short int  symb,
short int  nb = 1 
)

Definition at line 138 of file BNGram.cpp.

References _circArray, and _readIdx.

Referenced by SequenceDecoder::decode(), and testBNgram().

void BNgram::endSeq ( short int  nb = 1 )

Definition at line 151 of file BNGram.cpp.

References _add(), _circArray, _maxLength, and _readIdx.

Referenced by SequenceDecoder::decode(), and testBNgram().

void BNgram::show ( ostream &  str = cout )

Definition at line 160 of file BNGram.cpp.

References _seed, _show(), and _totalCount.

Referenced by sequenceDecoder(), and testBNgram().


Member Data Documentation

unsigned long* BNgram::_circArray [private]

Definition at line 76 of file BNGram.h.

Referenced by addSymb(), beginSeq(), BNgram(), endSeq(), and ~BNgram().

short int BNgram::_maxLength [private]

Definition at line 75 of file BNGram.h.

Referenced by _show(), addSymb(), BNgram(), and endSeq().

short int BNgram::_nbElt [private]

Definition at line 78 of file BNGram.h.

Referenced by _add(), _findInsert(), _freeTree(), _newNode(), and BNgram().

unsigned long BNgram::_readIdx [private]

Definition at line 77 of file BNGram.h.

Referenced by addSymb(), beginSeq(), BNgram(), and endSeq().

Definition at line 79 of file BNGram.h.

Referenced by _add(), BNgram(), show(), and ~BNgram().

unsigned long BNgram::_totalCount [private]

Definition at line 74 of file BNGram.h.

Referenced by _add(), BNgram(), and show().


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