#include <BNGram.h>

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 |
Definition at line 72 of file BNGram.h.
| 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.
| 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.
| 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().
unsigned long* BNgram::_circArray [private] |
short int BNgram::_maxLength [private] |
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] |
BNgramNode* BNgram::_seed [private] |
unsigned long BNgram::_totalCount [private] |
1.7.2