Public Types | Public Member Functions | Static Public Member Functions

fst::MutableFst< A > Class Template Reference

An expanded FST plus mutators (use MutableArcIterator to modify arcs). More...

#include <fst/mutable-fst.h>

Inherits fst::ExpandedFst< A >.

Collaboration diagram for fst::MutableFst< A >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef A Arc
typedef A::Weight Weight
typedef A::StateId StateId

Public Member Functions

virtual MutableFst< A > & operator= (const Fst< A > &fst)=0
MutableFst< A > & operator= (const MutableFst< A > &fst)
virtual void SetStart (StateId)=0
 Set the initial state.
virtual void SetFinal (StateId, Weight)=0
 Set a state's final weight.
virtual void SetProperties (uint64 props, uint64 mask)=0
 Set property bits wrt mask.
virtual StateId AddState ()=0
 Add a state, return its ID.
virtual void AddArc (StateId, const A &arc)=0
 Add an arc to state.
virtual void DeleteStates (const vector< StateId > &)=0
 Delete some states.
virtual void DeleteStates ()=0
 Delete all states.
virtual void DeleteArcs (StateId, size_t n)=0
 Delete some arcs at state.
virtual void DeleteArcs (StateId)=0
 Delete all arcs at state.
virtual const SymbolTableInputSymbols () const =0
 Return input label symbol table; return NULL if not specified.
virtual const SymbolTableOutputSymbols () const =0
 Return output label symbol table; return NULL if not specified.
virtual SymbolTableMutableInputSymbols ()=0
 Return input label symbol table; return NULL if not specified.
virtual SymbolTableMutableOutputSymbols ()=0
 Return output label symbol table; return NULL if not specified.
virtual void SetInputSymbols (const SymbolTable *isyms)=0
 Set input label symbol table; NULL signifies not unspecified.
virtual void SetOutputSymbols (const SymbolTable *osyms)=0
 Set output label symbol table; NULL signifies not unspecified.
virtual MutableFst< A > * Copy (bool safe=false) const =0
 Get a copy of this MutableFst. See Fst<>::Copy() for further doc.
virtual void InitMutableArcIterator (StateId s, MutableArcIteratorData< A > *)=0

Static Public Member Functions

static MutableFst< A > * Read (istream &strm, const FstReadOptions &opts)
 Read an MutableFst from an input stream; return NULL on error.
static MutableFst< A > * Read (const string &filename)

Detailed Description

template<class A>
class fst::MutableFst< A >

An expanded FST plus mutators (use MutableArcIterator to modify arcs).

Definition at line 37 of file mutable-fst.h.


Member Typedef Documentation

template<class A>
typedef A fst::MutableFst< A >::Arc
template<class A>
typedef A::StateId fst::MutableFst< A >::StateId
template<class A>
typedef A::Weight fst::MutableFst< A >::Weight

Member Function Documentation

template<class A>
virtual void fst::MutableFst< A >::AddArc ( StateId  ,
const A &  arc 
) [pure virtual]

Add an arc to state.

template<class A>
virtual StateId fst::MutableFst< A >::AddState (  )  [pure virtual]
template<class A>
virtual MutableFst<A>* fst::MutableFst< A >::Copy ( bool  safe = false  )  const [pure virtual]

Get a copy of this MutableFst. See Fst<>::Copy() for further doc.

Implements fst::ExpandedFst< A >.

Implemented in fst::EditFst< A >, fst::VectorFst< A >, fst::VectorFst< RevA >, and fst::VectorFst< Arc >.

template<class A>
virtual void fst::MutableFst< A >::DeleteArcs ( StateId  ,
size_t  n 
) [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::DeleteArcs ( StateId   )  [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::DeleteStates (  )  [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::DeleteStates ( const vector< StateId > &   )  [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::InitMutableArcIterator ( StateId  s,
MutableArcIteratorData< A > *   
) [pure virtual]

For generic mutuble arc iterator construction; not normally called directly by users.

template<class A>
virtual const SymbolTable* fst::MutableFst< A >::InputSymbols (  )  const [pure virtual]
template<class A>
virtual SymbolTable* fst::MutableFst< A >::MutableInputSymbols (  )  [pure virtual]
template<class A>
virtual SymbolTable* fst::MutableFst< A >::MutableOutputSymbols (  )  [pure virtual]
template<class A>
MutableFst<A>& fst::MutableFst< A >::operator= ( const MutableFst< A > &  fst  )  [inline]

Definition at line 45 of file mutable-fst.h.

template<class A>
virtual MutableFst<A>& fst::MutableFst< A >::operator= ( const Fst< A > &  fst  )  [pure virtual]
template<class A>
virtual const SymbolTable* fst::MutableFst< A >::OutputSymbols (  )  const [pure virtual]
template<class A>
static MutableFst<A>* fst::MutableFst< A >::Read ( istream &  strm,
const FstReadOptions opts 
) [inline, static]

Read an MutableFst from an input stream; return NULL on error.

Reimplemented from fst::ExpandedFst< A >.

Reimplemented in fst::EditFst< A >, fst::VectorFst< A >, fst::VectorFst< RevA >, and fst::VectorFst< Arc >.

Definition at line 80 of file mutable-fst.h.

template<class A>
static MutableFst<A>* fst::MutableFst< A >::Read ( const string &  filename  )  [inline, static]
template<class A>
virtual void fst::MutableFst< A >::SetFinal ( StateId  ,
Weight   
) [pure virtual]

Set a state's final weight.

template<class A>
virtual void fst::MutableFst< A >::SetInputSymbols ( const SymbolTable isyms  )  [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::SetOutputSymbols ( const SymbolTable osyms  )  [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::SetProperties ( uint64  props,
uint64  mask 
) [pure virtual]
template<class A>
virtual void fst::MutableFst< A >::SetStart ( StateId   )  [pure virtual]

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