Public Types | Public Member Functions | Static Public Member Functions | Friends

fst::VectorFst< A > Class Template Reference

#include <fst/vector-fst.h>

Inherits ImplToMutableFst< VectorFstImpl< A > >.

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

List of all members.

Public Types

typedef A Arc
typedef A::StateId StateId
typedef VectorFstImpl< A > Impl

Public Member Functions

 VectorFst ()
 VectorFst (const Fst< A > &fst)
 VectorFst (const VectorFst< A > &fst)
virtual VectorFst< A > * Copy (bool safe=false) const
 Get a copy of this VectorFst. See Fst<>::Copy() for further doc.
VectorFst< A > & operator= (const VectorFst< A > &fst)
virtual VectorFst< A > & operator= (const Fst< A > &fst)
void ReserveStates (StateId n)
void ReserveArcs (StateId s, size_t n)
virtual void InitStateIterator (StateIteratorData< Arc > *data) const
virtual void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const
virtual void InitMutableArcIterator (StateId s, MutableArcIteratorData< A > *)
 Provide information needed for the generic mutable arc iterator.

Static Public Member Functions

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

Friends

class StateIterator< VectorFst< A > >
class ArcIterator< VectorFst< A > >
class MutableArcIterator< VectorFst< A > >
template<class F , class G >
void Cast (const F &, G *)

Detailed Description

template<class A>
class fst::VectorFst< A >

Simple concrete, mutable FST. This class attaches interface to implementation and handles reference counting, delegating most methods to ImplToMutableFst. Supports additional operations: ReserveStates and ReserveArcs (cf. STL vectors).

Definition at line 427 of file vector-fst.h.


Member Typedef Documentation

template<class A>
typedef A fst::VectorFst< A >::Arc

Reimplemented from fst::ImplToMutableFst< VectorFstImpl< A > >.

Definition at line 434 of file vector-fst.h.

template<class A>
typedef VectorFstImpl<A> fst::VectorFst< A >::Impl

Definition at line 436 of file vector-fst.h.

template<class A>
typedef A::StateId fst::VectorFst< A >::StateId

Reimplemented from fst::ImplToMutableFst< VectorFstImpl< A > >.

Definition at line 435 of file vector-fst.h.


Constructor & Destructor Documentation

template<class A>
fst::VectorFst< A >::VectorFst (  )  [inline]

Definition at line 438 of file vector-fst.h.

template<class A>
fst::VectorFst< A >::VectorFst ( const Fst< A > &  fst  )  [inline, explicit]

Definition at line 440 of file vector-fst.h.

template<class A>
fst::VectorFst< A >::VectorFst ( const VectorFst< A > &  fst  )  [inline]

Definition at line 443 of file vector-fst.h.


Member Function Documentation

template<class A>
virtual VectorFst<A>* fst::VectorFst< A >::Copy ( bool  safe = false  )  const [inline, virtual]

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

Implements fst::MutableFst< typename VectorFstImpl< A >::Arc >.

Definition at line 446 of file vector-fst.h.

template<class A>
virtual void fst::VectorFst< A >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
) const [inline, virtual]

Definition at line 487 of file vector-fst.h.

template<class A>
void fst::VectorFst< A >::InitMutableArcIterator ( StateId  s,
MutableArcIteratorData< A > *  data 
) [inline, virtual]

Provide information needed for the generic mutable arc iterator.

Definition at line 671 of file vector-fst.h.

template<class A>
virtual void fst::VectorFst< A >::InitStateIterator ( StateIteratorData< Arc > *  data  )  const [inline, virtual]

Definition at line 483 of file vector-fst.h.

template<class A>
VectorFst<A>& fst::VectorFst< A >::operator= ( const VectorFst< A > &  fst  )  [inline]

Definition at line 450 of file vector-fst.h.

template<class A>
virtual VectorFst<A>& fst::VectorFst< A >::operator= ( const Fst< A > &  fst  )  [inline, virtual]

Definition at line 455 of file vector-fst.h.

template<class A>
static VectorFst<A>* fst::VectorFst< A >::Read ( const string &  filename  )  [inline, static]

Read a VectorFst from a file; return NULL on error Empty filename reads from standard input

Reimplemented from fst::ImplToExpandedFst< VectorFstImpl< A >, MutableFst< typename VectorFstImpl< A >::Arc > >.

Definition at line 468 of file vector-fst.h.

template<class A>
static VectorFst<A>* fst::VectorFst< A >::Read ( istream &  strm,
const FstReadOptions opts 
) [inline, static]

Read a VectorFst from an input stream; return NULL on error.

Reimplemented from fst::MutableFst< typename VectorFstImpl< A >::Arc >.

Definition at line 461 of file vector-fst.h.

template<class A>
void fst::VectorFst< A >::ReserveArcs ( StateId  s,
size_t  n 
) [inline]

Definition at line 478 of file vector-fst.h.

template<class A>
void fst::VectorFst< A >::ReserveStates ( StateId  n  )  [inline]

Definition at line 473 of file vector-fst.h.


Friends And Related Function Documentation

template<class A>
friend class ArcIterator< VectorFst< A > > [friend]

Definition at line 430 of file vector-fst.h.

template<class A>
template<class F , class G >
void Cast ( const F &  ,
G *   
) [friend]

Converts FSTs by casting their implementations, where this makes sense (which excludes implementations with virtual methods). Must be a friend of the Fst classes involved (currently the concrete Fsts: VectorFst, ConstFst, CompactFst).

template<class A>
friend class MutableArcIterator< VectorFst< A > > [friend]

Definition at line 431 of file vector-fst.h.

template<class A>
friend class StateIterator< VectorFst< A > > [friend]

Definition at line 429 of file vector-fst.h.


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