Container representing each node in the Trie. More...
#include <trie.h>
Public Types | |
typedef Items::const_iterator | const_iterator |
typedef NodeClass::EndNodeItemClass | EndNodeItemClass |
typedef NodeItem< T, V, Cmp, VectorItems< T, V, Cmp, Max, M > > | Item |
typedef std::vector< Item * > | Items |
typedef Items::iterator | iterator |
typedef Node< T, V, Cmp, VectorItems< T, V, Cmp, Max, M > > | NodeClass |
typedef NodeClass::NodeItemClass | NodeItemClass |
Public Member Functions | |
VectorItems (T const &endSymbol) | |
void | assignItem (T k, Item *i) |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
NodeItemClass * | createNodeItem (T const &k) |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
bool | eraseItem (T const &k) |
const_iterator | find (const T &k) const |
iterator | find (const T &k) |
Item * | getItem (T const &k) |
const Item * | getItem (T const &k) const |
std::pair< Item *, bool > | insertItem (T const &k) |
Protected Attributes | |
const T | mEndSymbol |
Items | mItems |
M | mSymolToIndex |
Container representing each node in the Trie.
With this class the container used for storing node item is STL vector. Here each node will use a space propotional to Max. For searching only constant time taken at each node.
T | Type for each element in the key |
V | Type of the value that the key will be representing |
Cmp | Comparison functor |
Max | Maximum element that a Trie node can have |