Top-level trie class-template using an adjaceny table.
More...
|
|
| TrieVector (size_t max_len=NoMaxLen, bool use_case=false) |
|
| ~TrieVector (void) |
|
void | clear (void) |
|
|
const size_t & | maxlen (void) const |
|
size_t & | maxlen (void) |
|
bool | compiled (void) const |
|
void | ensure_compiled (void) |
|
const DataT & | default_data (void) const |
|
DataT & | default_data (void) |
|
|
string_type | trie_canonicalize (string_type &s) const |
|
void | trie_key (const string_type &s, const size_t max_len, string_type &dst) const |
|
string_type | trie_key (const string_type &s, const size_t max_len) const |
|
string_type | trie_key (const string_type &s) const |
|
void | trie_rkey (const string_type &s, const size_t max_len, string_type &dst) const |
|
string_type | trie_rkey (const string_type &s, size_t max_len) const |
|
string_type | trie_rkey (const string_type &s) const |
|
|
void | trie_insert (const string_type &s, size_t max_len) |
|
void | trie_insert (const string_type &s) |
|
void | trie_rinsert (const string_type &s, size_t max_len) |
|
void | trie_rinsert (const string_type &s) |
|
|
iterator | find_dtr (const node_type &from, CharT label) |
|
const_iterator | find_dtr (const node_type &from, CharT label) const |
|
NodeId | find_dtr_id (NodeId fromid, CharT label) const |
|
iterator | first_dtr (const node_type &from) |
|
const_iterator | first_dtr (const node_type &from) const |
|
iterator | find_mother (const node_type &to) |
|
const_iterator | find_mother (const node_type &to) const |
|
NodeId | find_mother_id (NodeId toid) const |
|
string_type | node_rstring (const node_type &node) const |
|
string_type | node_rstring (NodeId nodeid) const |
|
string_type | node_string (const node_type &node) const |
|
string_type | node_string (NodeId nodeid) const |
|
size_t | node_depth (const node_type &node) const |
|
size_t | node_depth (NodeId nodeid) const |
|
|
void | compile (void) |
|
|
iterator | find_longest (const string_type &s, size_t *matchlen=__null) |
|
const_iterator | find_longest (const string_type &s, size_t *matchlen=__null) const |
|
iterator | rfind_longest (const string_type &s, size_t *matchlen=__null) |
|
const_iterator | rfind_longest (const string_type &s, size_t *matchlen=__null) const |
|
| TrieVectorBase (size_t maxlen=NoMaxLen, bool use_case=false) |
|
|
static const NodeId | NoNode = static_cast<size_t>(-1) |
|
static const size_t | NoMaxLen = static_cast<size_t>(-1) |
|
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
class moot::TrieVector< DataT, CharT, UCharT >
Requirements for DataT:
- must have a default constructor
Requirements for CharT
- should support implicit conversion from integer constants (esp. zero)
Requirements for UCharT
- must be an unsigned type
- should be at least as wide as CharT
◆ data_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ char_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ uchar_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ trie_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ node_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ vector_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ const_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ string_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ string_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ const_string_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ reverse_string_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ const_reverse_string_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ map_type
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ map_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ const_map_iterator
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ TrieVector()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ ~TrieVector()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ clear()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ maxlen() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get maximum length for this trie (read-only)
◆ maxlen() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get maximum length for this trie (read/write)
◆ compiled()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Check whether this trie is compiled
◆ ensure_compiled()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Ensure that this trie is compiled
◆ default_data() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const DataT& moot::TrieVector< DataT, CharT, UCharT >::default_data |
( |
void |
| ) |
const |
|
inline |
Get default data (read-only)
◆ default_data() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get default data (read-write)
◆ trie_canonicalize()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Canonicalize case of a string
◆ trie_key() [1/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Assign valid prefix-key of up to characters from to
◆ trie_key() [2/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Create and return a valid prefix-key of up to characters from
◆ trie_key() [3/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Create and return a valid prefix-key of up to characters from
◆ trie_rkey() [1/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Assign valid suffix-key of up to characters from to
◆ trie_rkey() [2/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Create and return a valid suffix-key of up to characters from
◆ trie_rkey() [3/3]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Create and return a valid suffix-key of up to characters from
◆ trie_insert() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Insert a prefix-key into the pending-queue, giving maximum length
◆ trie_insert() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Insert a prefix-key into the pending-queue, using trie-internal maximum length
◆ trie_rinsert() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Insert a suffix-key into the pending-queue, giving maximum length
◆ trie_rinsert() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Insert a suffix-key into the pending-queue, using trie-internal maximum length
◆ find_dtr() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Daughter lookup, iterator, read/write
Find the daughter of the node on label . On success, returns an iterator pointing to the daughter. Returns end() if no such daughter exists.
- Requires a compiled transition table.
- should be a valid node
◆ find_dtr() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Daughter lookup, iterator, read-only
◆ find_dtr_id()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Daughter lookup, NodeId, read-only
◆ first_dtr() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Daughter iteration, read/write
Find the first daughter of the node . On success, returns an iterator pointing to the daughter. Returns end() if no such daughter exists.
- Requires a compiled transition table.
- should be a valid node
◆ first_dtr() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Daughter lookup, iterator, read-only
◆ find_mother() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Mother lookup, iterator, read/write
Find the mother of the node . On success, returns an iterator pointing to the mother. Returns end() if is the root node.
- Requires a compiled transition table.
- should be a valid node
◆ find_mother() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Mother lookup, iterator, read-only
◆ find_mother_id()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Mother lookup, NodeId, read-only
◆ node_rstring() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get full path to node as a reverse string
◆ node_rstring() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get full path to node with id as a string
◆ node_string() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get full path to node as a string
◆ node_string() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get full path to node with id as a string
◆ node_depth() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ node_depth() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Get depth of node with id
◆ compile()
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Build transition table from the map of pending keys
◆ find_longest() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Forward lookup, read/write
Lookup longest match (of up to characters) for string , reading from left to right. Returns a iterator pointing to the deepest matching node and sets * to the number of characters actually matched. Returns end() on failure.
◆ find_longest() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Forward lookup, read-only
◆ rfind_longest() [1/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Reverse lookup, read/write
Like find_longest(), but reads backwards from the end of .
◆ rfind_longest() [2/2]
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
Reverse lookup, read-only
◆ trie_pending
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
◆ trie_default_data
template<class DataT, typename CharT = char, typename UCharT = unsigned char>
The documentation for this class was generated from the following file: