Public Types | Public Member Functions

fst::ArcIterator< ReplaceFst< A, T > > Class Template Reference

#include <fst/replace.h>

Collaboration diagram for fst::ArcIterator< ReplaceFst< A, T > >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef A Arc
typedef A::StateId StateId

Public Member Functions

 ArcIterator (const ReplaceFst< A, T > &fst, StateId s)
 ~ArcIterator ()
void ExpandAndCache () const
void Init ()
bool Done () const
const A & Value () const
void Next ()
size_t Position () const
void Reset ()
void Seek (size_t pos)
uint32 Flags () const
void SetFlags (uint32 f, uint32 mask)

Detailed Description

template<class A, class T>
class fst::ArcIterator< ReplaceFst< A, T > >

Specialization for ReplaceFst. Implements optional caching. It can be used as follows:

ReplaceFst replace; ArcIterator< ReplaceFst > aiter(replace, s); Note: ArcIterator< Fst > is always a caching arc iterator. aiter.SetFlags(kArcNoCache, kArcNoCache); Use the arc iterator, no arc will be cached, no state will be expanded. The varied 'kArcValueFlags' can be used to decide which part of arc values needs to be computed. aiter.SetFlags(kArcILabelValue, kArcValueFlags); Only want the ilabel for this arc aiter.Value(); ///< Does not compute the destination state. aiter.Next(); aiter.SetFlags(kArcNextStateValue, kArcNextStateValue); Want both ilabel and nextstate for that arc aiter.Value(); ///< Does compute the destination state and inserts it in the replace state table. No Arc has been cached at that point.

Definition at line 1051 of file replace.h.


Member Typedef Documentation

template<class A , class T >
typedef A fst::ArcIterator< ReplaceFst< A, T > >::Arc

Definition at line 1053 of file replace.h.

template<class A , class T >
typedef A::StateId fst::ArcIterator< ReplaceFst< A, T > >::StateId

Definition at line 1054 of file replace.h.


Constructor & Destructor Documentation

template<class A , class T >
fst::ArcIterator< ReplaceFst< A, T > >::ArcIterator ( const ReplaceFst< A, T > &  fst,
StateId  s 
) [inline]

Definition at line 1056 of file replace.h.

template<class A , class T >
fst::ArcIterator< ReplaceFst< A, T > >::~ArcIterator (  )  [inline]

Definition at line 1109 of file replace.h.


Member Function Documentation

template<class A , class T >
bool fst::ArcIterator< ReplaceFst< A, T > >::Done (  )  const [inline]

Definition at line 1145 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::ExpandAndCache (  )  const [inline]

Definition at line 1116 of file replace.h.

template<class A , class T >
uint32 fst::ArcIterator< ReplaceFst< A, T > >::Flags (  )  const [inline]

Definition at line 1190 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::Init (  )  [inline]

Definition at line 1129 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::Next (  )  [inline]

Definition at line 1182 of file replace.h.

template<class A , class T >
size_t fst::ArcIterator< ReplaceFst< A, T > >::Position (  )  const [inline]

Definition at line 1184 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::Reset (  )  [inline]

Definition at line 1186 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::Seek ( size_t  pos  )  [inline]

Definition at line 1188 of file replace.h.

template<class A , class T >
void fst::ArcIterator< ReplaceFst< A, T > >::SetFlags ( uint32  f,
uint32  mask 
) [inline]

Definition at line 1192 of file replace.h.

template<class A , class T >
const A& fst::ArcIterator< ReplaceFst< A, T > >::Value (  )  const [inline]

Definition at line 1147 of file replace.h.


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