#include <fst/state-table.h>

Public Types | |
| typedef T | StateTuple |
| typedef StateTuple::StateId | StateId |
Public Member Functions | |
| HashStateTable () | |
| StateId | FindState (const StateTuple &tuple) |
| const StateTuple & | Tuple (StateId s) const |
| StateId | Size () const |
STATE TABLES - these determine the bijective mapping between state tuples (e.g. in composition triples of two FST states and a composition filter state) and their corresponding state IDs. They are classes, templated on state tuples, of the form:
template <class t>=""> class StateTable { public: typedef typename T StateTuple;
Required constructors. StateTable();
Lookup state ID by tuple. If it doesn't exist, then add it. StateId FindState(const StateTuple &); Lookup state tuple by state ID. const StateTuple<StateId> &Tuple(StateId) const; # of stored tuples. StateId Size() const; };
A state tuple has the form:
template <class s>=""> struct StateTuple { typedef typename S StateId;
Required constructor. StateTuple(); }; An implementation using a hash map for the tuple to state ID mapping. 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 68 of file state-table.h.
| typedef StateTuple::StateId fst::HashStateTable< T, H >::StateId |
Definition at line 71 of file state-table.h.
| typedef T fst::HashStateTable< T, H >::StateTuple |
Definition at line 70 of file state-table.h.
| fst::HashStateTable< T, H >::HashStateTable | ( | ) | [inline] |
Definition at line 73 of file state-table.h.
| StateId fst::HashStateTable< T, H >::FindState | ( | const StateTuple & | tuple | ) | [inline] |
Definition at line 77 of file state-table.h.
| StateId fst::HashStateTable< T, H >::Size | ( | ) | const [inline] |
Definition at line 90 of file state-table.h.
| const StateTuple& fst::HashStateTable< T, H >::Tuple | ( | StateId | s | ) | const [inline] |
Definition at line 86 of file state-table.h.
1.7.1