30 #ifndef __CLAW_TRIE_HPP__
31 #define __CLAW_TRIE_HPP__
62 template<
class T,
class Comp = std::equal_to<T> >
class trie
83 trie_node(
const T& val,
unsigned int c = 0 );
84 trie_node(
const trie_node& that );
91 typedef const T value_type;
92 typedef Comp value_equal_to;
95 typedef trie_node* trie_node_ptr;
103 unsigned int size()
const;
108 template<
class InputIterator>
109 void insert(InputIterator
first, InputIterator last);
111 template <
class InputIterator>
112 unsigned int count(InputIterator first, InputIterator last);
116 static value_equal_to s_value_equal_to;
119 trie_node_ptr m_tree;
129 #endif // __CLAW_TRIE_HPP__
unsigned int count(InputIterator first, InputIterator last)
Gets a word count.
This class is a trie tree.
void clear()
Clear the trie.
Fuction object to get the first element of a std::pair.
void insert(InputIterator first, InputIterator last)
Add a word to the structure.
bool empty() const
Tell if the structure is empty or not.
unsigned int size() const
Gets size (words count) of the structure.
Implementation of the trie structure.