Public Member Functions |
| | Dictionary (void) |
| | Initialize as empty dictionary.
|
| void | init (const char *fn) |
| | Perform actual initialization.
|
| int | len (void) const |
| | Return maximal length of a word.
|
| int | words (void) const |
| | Return total number of words.
|
| int | words (int l) const |
| | Return number of words with length l.
|
| const char * | word (int l, int i) const |
| | Return word number i with length l.
|
| template<class Char , class Traits > |
std::basic_ostream< Char,
Traits > & | print (std::basic_ostream< Char, Traits > &os) const |
| | Print statistics summary.
|
| | ~Dictionary (void) |
| | Destructor.
|
Protected Attributes |
| unsigned int | max_len |
| | Actual maximal length in dictionary.
|
| int | n_all_words |
| | Total number of words.
|
| int | n_words [limit_len] |
| | Number of words of some length.
|
| char * | s_words [limit_len] |
| | Beginning of words of some length.
|
| char * | chunk |
| | One big memory chunk for storing words.
|
Static Protected Attributes |
| static const unsigned int | limit_len = 64 |
| | Maximal word length support.
|
A simple dictionary class.