Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

moot::TrieVector< DataT, CharT, UCharT > Class Template Reference

Top-level trie class-template using an adjaceny table. More...

#include <mootTrieVector.h>

Inheritance diagram for moot::TrieVector< DataT, CharT, UCharT >:

Inheritance graph
[legend]
Collaboration diagram for moot::TrieVector< DataT, CharT, UCharT >:

Collaboration graph
[legend]
List of all members.

Public Types

Public Member Functions

Constructors etc.
Accessors
Utilties
Insert
Low-Level Utilities
Compilation
Lookup

Public Attributes


Detailed Description

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
class moot::TrieVector< DataT, CharT, UCharT >

Requirements for DataT: Requirements for CharT Requirements for UCharT


Member Typedef Documentation

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef CharT moot::TrieVector< DataT, CharT, UCharT >::char_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef vector_type::const_iterator moot::TrieVector< DataT, CharT, UCharT >::const_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef map_type::const_iterator moot::TrieVector< DataT, CharT, UCharT >::const_map_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef string_type::const_reverse_iterator moot::TrieVector< DataT, CharT, UCharT >::const_reverse_string_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef string_type::const_iterator moot::TrieVector< DataT, CharT, UCharT >::const_string_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef DataT moot::TrieVector< DataT, CharT, UCharT >::data_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef vector_type::iterator moot::TrieVector< DataT, CharT, UCharT >::iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef map_type::iterator moot::TrieVector< DataT, CharT, UCharT >::map_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef std::map<string_type,NodeId> moot::TrieVector< DataT, CharT, UCharT >::map_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef TrieVectorNode<data_type,char_type,uchar_type> moot::TrieVector< DataT, CharT, UCharT >::node_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef string_type::reverse_iterator moot::TrieVector< DataT, CharT, UCharT >::reverse_string_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef string_type::iterator moot::TrieVector< DataT, CharT, UCharT >::string_iterator
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef std::string<char_type> moot::TrieVector< DataT, CharT, UCharT >::string_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef TrieVector<data_type,char_type,uchar_type> moot::TrieVector< DataT, CharT, UCharT >::trie_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef UCharT moot::TrieVector< DataT, CharT, UCharT >::uchar_type
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
typedef std::vector<node_type> moot::TrieVector< DataT, CharT, UCharT >::vector_type
 


Constructor & Destructor Documentation

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
moot::TrieVector< DataT, CharT, UCharT >::TrieVector size_t  max_len = NoMaxLen,
bool  use_case = false
[inline]
 

Default constructor

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
moot::TrieVector< DataT, CharT, UCharT >::~TrieVector void   )  [inline]
 

Destructor


Member Function Documentation

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::clear void   )  [inline]
 

Clear

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::compile void   )  [inline]
 

Build transition table from the map of pending keys

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
bool moot::TrieVector< DataT, CharT, UCharT >::compiled void   )  const [inline]
 

Check whether this trie is compiled

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
DataT& moot::TrieVector< DataT, CharT, UCharT >::default_data void   )  [inline]
 

Get default data (read-write)

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)

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::ensure_compiled void   )  [inline]
 

Ensure that this trie is compiled

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const_iterator moot::TrieVector< DataT, CharT, UCharT >::find_dtr const node_type from,
CharT  label
const [inline]
 

Daughter lookup, iterator, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
iterator moot::TrieVector< DataT, CharT, UCharT >::find_dtr const node_type from,
CharT  label
[inline]
 

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

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
NodeId moot::TrieVector< DataT, CharT, UCharT >::find_dtr_id NodeId  fromid,
CharT  label
const [inline]
 

Daughter lookup, NodeId, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const_iterator moot::TrieVector< DataT, CharT, UCharT >::find_longest const string_type s,
size_t *  matchlen = 0
const [inline]
 

Forward lookup, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
iterator moot::TrieVector< DataT, CharT, UCharT >::find_longest const string_type s,
size_t *  matchlen = 0
[inline]
 

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.

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const_iterator moot::TrieVector< DataT, CharT, UCharT >::find_mother const node_type to  )  const [inline]
 

Mother lookup, iterator, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
iterator moot::TrieVector< DataT, CharT, UCharT >::find_mother const node_type to  )  [inline]
 

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

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
NodeId moot::TrieVector< DataT, CharT, UCharT >::find_mother_id NodeId  toid  )  const [inline]
 

Mother lookup, NodeId, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const_iterator moot::TrieVector< DataT, CharT, UCharT >::first_dtr const node_type from  )  const [inline]
 

Daughter lookup, iterator, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
iterator moot::TrieVector< DataT, CharT, UCharT >::first_dtr const node_type from  )  [inline]
 

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

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
size_t& moot::TrieVector< DataT, CharT, UCharT >::maxlen void   )  [inline]
 

Get maximum length for this trie (read/write)

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const size_t& moot::TrieVector< DataT, CharT, UCharT >::maxlen void   )  const [inline]
 

Get maximum length for this trie (read-only)

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
size_t moot::TrieVector< DataT, CharT, UCharT >::node_depth NodeId  nodeid  )  const [inline]
 

Get depth of node with id

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
size_t moot::TrieVector< DataT, CharT, UCharT >::node_depth const node_type node  )  const [inline]
 

Get depth of node

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::node_rstring NodeId  nodeid  )  const [inline]
 

Get full path to node with id as a string

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::node_rstring const node_type node  )  const [inline]
 

Get full path to node as a reverse string

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::node_string NodeId  nodeid  )  const [inline]
 

Get full path to node with id as a string

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::node_string const node_type node  )  const [inline]
 

Get full path to node as a string

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
const_iterator moot::TrieVector< DataT, CharT, UCharT >::rfind_longest const string_type s,
size_t *  matchlen = 0
const [inline]
 

Reverse lookup, read-only

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
iterator moot::TrieVector< DataT, CharT, UCharT >::rfind_longest const string_type s,
size_t *  matchlen = 0
[inline]
 

Reverse lookup, read/write

Like find_longest(), but reads backwards from the end of .

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::trie_canonicalize string_type s  )  const [inline]
 

Canonicalize case of a string

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_insert const string_type s  )  [inline]
 

Insert a prefix-key into the pending-queue, using trie-internal maximum length

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_insert const string_type s,
size_t  max_len
[inline]
 

Insert a prefix-key into the pending-queue, giving maximum length

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::trie_key const string_type s  )  const [inline]
 

Create and return a valid prefix-key of up to characters from

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::trie_key const string_type s,
const size_t  max_len
const [inline]
 

Create and return a valid prefix-key of up to characters from

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_key const string_type s,
const size_t  max_len,
string_type dst
const [inline]
 

Assign valid prefix-key of up to characters from to

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_rinsert const string_type s  )  [inline]
 

Insert a suffix-key into the pending-queue, using trie-internal maximum length

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_rinsert const string_type s,
size_t  max_len
[inline]
 

Insert a suffix-key into the pending-queue, giving maximum length

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::trie_rkey const string_type s  )  const [inline]
 

Create and return a valid suffix-key of up to characters from

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
string_type moot::TrieVector< DataT, CharT, UCharT >::trie_rkey const string_type s,
size_t  max_len
const [inline]
 

Create and return a valid suffix-key of up to characters from

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
void moot::TrieVector< DataT, CharT, UCharT >::trie_rkey const string_type s,
const size_t  max_len,
string_type dst
const [inline]
 

Assign valid suffix-key of up to characters from to


Member Data Documentation

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
data_type moot::TrieVector< DataT, CharT, UCharT >::trie_default_data
 

template<class DataT, typename CharT = char, typename UCharT = unsigned char>
map_type moot::TrieVector< DataT, CharT, UCharT >::trie_pending
 


The documentation for this class was generated from the following file:
Generated on Mon Jun 27 13:05:29 2005 for libmoot by  doxygen 1.3.8-20040913