Implementation class for replace class Fst.
More...
#include <fst/replace.h>
Inherits fst::CacheImpl< A >.
List of all members.
Classes |
| class | PrefixTuple |
| | Tuple of fst_id and destination state (entry in stack prefix).
|
| class | StackPrefix |
| | Container for stack prefix.
|
| class | StackPrefixEqual |
| | Compare two stack prefix classes for equality.
|
| class | StackPrefixKey |
| | Hash function for stack prefix to prefix id.
|
Public Types |
| typedef A::Label | Label |
| typedef A::Weight | Weight |
| typedef A::StateId | StateId |
| typedef CacheState< A > | State |
| typedef A | Arc |
typedef unordered_map< Label,
Label > | NonTerminalHash |
| typedef T | StateTable |
| typedef T::PrefixId | PrefixId |
typedef ReplaceStateTuple
< StateId, PrefixId > | StateTuple |
Public Member Functions |
| | ReplaceFstImpl (const vector< pair< Label, const Fst< A > * > > &fst_tuples, const ReplaceFstOptions< A, T > &opts) |
| | ReplaceFstImpl (const ReplaceFstImpl &impl) |
| | ~ReplaceFstImpl () |
| bool | CyclicDependencies () const |
| StateId | Start () |
| | Return or compute start state of replace fst.
|
| Weight | Final (StateId s) |
| | return final weight of state (kInfWeight means state is not final)
|
| size_t | NumArcs (StateId s) |
| bool | IsNonTerminal (Label l) const |
| | Returns whether a given label is a non terminal.
|
| size_t | NumInputEpsilons (StateId s) |
| size_t | NumOutputEpsilons (StateId s) |
| void | InitArcIterator (StateId s, ArcIteratorData< A > *data) |
| void | Expand (StateId s) |
| | Extend current state (walk arcs one level deep).
|
| void | Expand (StateId s, const StateTuple &tuple, const ArcIteratorData< A > &data) |
| bool | ComputeFinalArc (const StateTuple &tuple, A *arcp, uint32 flags=kArcValueFlags) |
| bool | ComputeArc (const StateTuple &tuple, const A &arc, A *arcp, uint32 flags=kArcValueFlags) |
| uint32 | ArcIteratorFlags () const |
| | Returns the arc iterator flags supported by this Fst.
|
| T * | GetStateTable () const |
| const Fst< A > * | GetFst (Label fst_id) const |
| bool | EpsilonOnReplace () const |
Detailed Description
template<class A, class T>
class fst::ReplaceFstImpl< A, T >
Implementation class for replace class Fst.
The replace implementation class supports a dynamic expansion of a recursive transition network represented as Fst with dynamic replacable arcs.
Definition at line 305 of file replace.h.
Member Typedef Documentation
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
Constructor & Destructor Documentation
template<class A, class T>
constructor for replace class implementation.
- Parameters:
-
| fst_tuples | array of label/fst tuples, one for each non-terminal |
Definition at line 337 of file replace.h.
template<class A, class T>
template<class A, class T>
Member Function Documentation
template<class A, class T>
Returns the arc iterator flags supported by this Fst.
Definition at line 747 of file replace.h.
template<class A, class T>
Compute the arc in the replace fst corresponding to a given in the underlying machine. Returns false if the underlying arc corresponds to no arc in the replace.
Definition at line 698 of file replace.h.
template<class A, class T>
If arcp == 0, only returns if a final arc is required, does not actually compute it.
Definition at line 667 of file replace.h.
template<class A, class T>
Computes the dependency graph of the replace class and returns true if the dependencies are cyclic. Cyclic dependencies will result in an un-expandable replace fst.
Definition at line 459 of file replace.h.
template<class A, class T>
template<class A, class T>
Extend current state (walk arcs one level deep).
Definition at line 615 of file replace.h.
template<class A, class T>
template<class A, class T>
return final weight of state (kInfWeight means state is not final)
Definition at line 488 of file replace.h.
template<class A, class T>
template<class A, class T>
template<class A, class T>
return the base arc iterator, if arcs have not been computed yet, extend/recurse for new arcs.
Definition at line 604 of file replace.h.
template<class A, class T>
Returns whether a given label is a non terminal.
Definition at line 524 of file replace.h.
template<class A, class T>
template<class A, class T>
template<class A, class T>
template<class A, class T>
Return or compute start state of replace fst.
Definition at line 465 of file replace.h.
The documentation for this class was generated from the following file: