|
Claw
1.7.3
|
This class is a trie tree. More...
#include <trie.hpp>
Classes | |
| struct | trie_node |
| Node of our trie. Left subtree will be other suggestions for the current position, right subtree will be following items for the word seen from the root to here. | |
Public Types | |
| typedef const T | value_type |
| typedef Comp | value_equal_to |
Public Member Functions | |
| trie () | |
| Trie constructor. | |
| trie (const trie< T, Comp > &that) | |
| ~trie () | |
| Trie destructor. | |
| unsigned int | size () const |
| Gets size (words count) of the structure. | |
| bool | empty () const |
| Tell if the structure is empty or not. | |
| void | clear () |
| Clear the trie. | |
| template<class InputIterator > | |
| void | insert (InputIterator first, InputIterator last) |
| Add a word to the structure. | |
| template<class InputIterator > | |
| unsigned int | count (InputIterator first, InputIterator last) |
| Gets a word count. | |
This class is a trie tree.
Trie trees are used for storage and count of linear datas with similar prefixes, typically words. For example, if you insert words
| claw::trie< T, Comp >::trie | ( | ) |
| void claw::trie< T, Comp >::clear | ( | ) |
| unsigned int claw::trie< T, Comp >::count | ( | InputIterator | first, |
| InputIterator | last | ||
| ) |
| void claw::trie< T, Comp >::insert | ( | InputIterator | first, |
| InputIterator | last | ||
| ) |
1.8.1.2