Public Types | Public Member Functions

fst::ReplaceAccumulator< Accumulator, T > Class Template Reference

#include <fst/accumulator.h>

List of all members.

Public Types

typedef Accumulator::Arc Arc
typedef Arc::StateId StateId
typedef Arc::Label Label
typedef Arc::Weight Weight
typedef T StateTable
typedef T::StateTuple StateTuple

Public Member Functions

 ReplaceAccumulator ()
 ReplaceAccumulator (const vector< Accumulator * > &accumulators)
 ReplaceAccumulator (const ReplaceAccumulator< Accumulator, T > &acc)
 ~ReplaceAccumulator ()
void Init (const vector< pair< Label, const Fst< Arc > * > > &fst_tuples, const StateTable *state_table)
void SetState (StateId s)
Weight Sum (Weight w, Weight v)
template<class ArcIterator >
Weight Sum (Weight w, ArcIterator *aiter, ssize_t begin, ssize_t end)

Detailed Description

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
class fst::ReplaceAccumulator< Accumulator, T >

This class accumulates weights in a ReplaceFst. The 'Init' method takes as input the argument used to build the ReplaceFst and the ReplaceFst state table. It uses accumulators of type 'Accumulator' in the underlying FSTs.

Definition at line 606 of file accumulator.h.


Member Typedef Documentation

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef Accumulator::Arc fst::ReplaceAccumulator< Accumulator, T >::Arc

Definition at line 608 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef Arc::Label fst::ReplaceAccumulator< Accumulator, T >::Label

Definition at line 610 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef Arc::StateId fst::ReplaceAccumulator< Accumulator, T >::StateId

Definition at line 609 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef T fst::ReplaceAccumulator< Accumulator, T >::StateTable

Definition at line 612 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef T::StateTuple fst::ReplaceAccumulator< Accumulator, T >::StateTuple

Definition at line 613 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
typedef Arc::Weight fst::ReplaceAccumulator< Accumulator, T >::Weight

Definition at line 611 of file accumulator.h.


Constructor & Destructor Documentation

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
fst::ReplaceAccumulator< Accumulator, T >::ReplaceAccumulator (  )  [inline]

Definition at line 615 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
fst::ReplaceAccumulator< Accumulator, T >::ReplaceAccumulator ( const vector< Accumulator * > &  accumulators  )  [inline]

Definition at line 618 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
fst::ReplaceAccumulator< Accumulator, T >::ReplaceAccumulator ( const ReplaceAccumulator< Accumulator, T > &  acc  )  [inline]

Definition at line 622 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
fst::ReplaceAccumulator< Accumulator, T >::~ReplaceAccumulator (  )  [inline]

Definition at line 629 of file accumulator.h.


Member Function Documentation

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
void fst::ReplaceAccumulator< Accumulator, T >::Init ( const vector< pair< Label, const Fst< Arc > * > > &  fst_tuples,
const StateTable state_table 
) [inline]

Does not take ownership of the state table, the state table is own by the ReplaceFst

Definition at line 636 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
void fst::ReplaceAccumulator< Accumulator, T >::SetState ( StateId  s  )  [inline]

Definition at line 642 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
Weight fst::ReplaceAccumulator< Accumulator, T >::Sum ( Weight  w,
Weight  v 
) [inline]

Definition at line 657 of file accumulator.h.

template<class Accumulator, class T = DefaultReplaceStateTable<typename Accumulator::Arc>>
template<class ArcIterator >
Weight fst::ReplaceAccumulator< Accumulator, T >::Sum ( Weight  w,
ArcIterator aiter,
ssize_t  begin,
ssize_t  end 
) [inline]

Definition at line 662 of file accumulator.h.


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