Classes | Public Types | Public Member Functions | Friends

fst::CompactHashStateTable< T, H > Class Template Reference

#include <fst/state-table.h>

Inherited by fst::GenericComposeStateTable< Arc, typename MultiEpsFilter< AltSequenceComposeFilter< MultiEpsMatcher< Matcher< Fst< Arc > > > > >::FilterState >, and fst::GenericComposeStateTable< Arc, typename MultiEpsFilter< SequenceComposeFilter< MultiEpsMatcher< Matcher< Fst< Arc > > > > >::FilterState >.

Collaboration diagram for fst::CompactHashStateTable< T, H >:
Collaboration graph
[legend]

List of all members.

Classes

class  HashEqual
class  HashFunc

Public Types

typedef T StateTuple
typedef StateTuple::StateId StateId
typedef StateId Key

Public Member Functions

 CompactHashStateTable ()
 CompactHashStateTable (size_t table_size)
 Reserves space for table_size elements.
StateId FindState (const StateTuple &tuple)
const StateTupleTuple (StateId s) const
StateId Size () const

Friends

class HashFunc
class HashEqual

Detailed Description

template<class T, class H>
class fst::CompactHashStateTable< T, H >

An implementation using a hash set for the tuple to state ID mapping. The hash set holds 'keys' which are either the state ID or kCurrentKey. These keys can be mapped to tuples either by looking up in the tuple vector or, if kCurrentKey, in current_tuple_ member. The hash and key equality functions map to tuples first. The state tuple T must have == defined and the default constructor must produce a tuple that will never be seen. H is the hash function.

Definition at line 109 of file state-table.h.


Member Typedef Documentation

template<class T, class H>
typedef StateId fst::CompactHashStateTable< T, H >::Key

Definition at line 115 of file state-table.h.

template<class T, class H>
typedef StateTuple::StateId fst::CompactHashStateTable< T, H >::StateId
template<class T, class H>
typedef T fst::CompactHashStateTable< T, H >::StateTuple

Constructor & Destructor Documentation

template<class T, class H>
fst::CompactHashStateTable< T, H >::CompactHashStateTable (  )  [inline]

Definition at line 117 of file state-table.h.

template<class T, class H>
fst::CompactHashStateTable< T, H >::CompactHashStateTable ( size_t  table_size  )  [inline, explicit]

Reserves space for table_size elements.

Definition at line 124 of file state-table.h.


Member Function Documentation

template<class T, class H>
StateId fst::CompactHashStateTable< T, H >::FindState ( const StateTuple tuple  )  [inline]

Definition at line 131 of file state-table.h.

template<class T, class H>
StateId fst::CompactHashStateTable< T, H >::Size (  )  const [inline]

Definition at line 148 of file state-table.h.

template<class T, class H>
const StateTuple& fst::CompactHashStateTable< T, H >::Tuple ( StateId  s  )  const [inline]

Definition at line 144 of file state-table.h.


Friends And Related Function Documentation

template<class T, class H>
friend class HashEqual [friend]

Definition at line 112 of file state-table.h.

template<class T, class H>
friend class HashFunc [friend]

Definition at line 111 of file state-table.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines