Cambridge SMT System
fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT > Class Template Reference

templated Mapper that modifies weights over an FST, passing through the other values of the arc. This mapper is to be combined with any functor that accepts Arc::Weight as a unique parameter for operator () and returns Arc::Weight. The functor itself implements the mapping details, e.g. see lexicographic unit tests More...

#include <fstutils.mapper.hpp>

Public Member Functions

 GenericWeightAutoMapper (const WeightMakerFunctorT &mw)
 Constructor. More...
 
Arc operator() (const Arc &arc) const
 Takes arc as input parameter and returns modified arc. More...
 
MapSymbolsAction InputSymbolsAction () const
 
MapSymbolsAction OutputSymbolsAction () const
 
MapFinalAction FinalAction () const
 
uint Properties (uint props) const
 

Public Attributes

WeightMakerFunctorT const & mw_
 Specialized functor that modifies arc weights. More...
 

Detailed Description

template<class Arc, class WeightMakerFunctorT>
class fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >

templated Mapper that modifies weights over an FST, passing through the other values of the arc. This mapper is to be combined with any functor that accepts Arc::Weight as a unique parameter for operator () and returns Arc::Weight. The functor itself implements the mapping details, e.g. see lexicographic unit tests

Definition at line 32 of file fstutils.mapper.hpp.

Constructor & Destructor Documentation

template<class Arc , class WeightMakerFunctorT >
fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::GenericWeightAutoMapper ( const WeightMakerFunctorT &  mw)
inlineexplicit

Constructor.

Definition at line 35 of file fstutils.mapper.hpp.

Member Function Documentation

template<class Arc , class WeightMakerFunctorT >
MapFinalAction fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::FinalAction ( ) const
inline

Definition at line 50 of file fstutils.mapper.hpp.

template<class Arc , class WeightMakerFunctorT >
MapSymbolsAction fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::InputSymbolsAction ( ) const
inline

Definition at line 44 of file fstutils.mapper.hpp.

template<class Arc , class WeightMakerFunctorT >
Arc fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::operator() ( const Arc &  arc) const
inline

Takes arc as input parameter and returns modified arc.

Definition at line 40 of file fstutils.mapper.hpp.

template<class Arc , class WeightMakerFunctorT >
MapSymbolsAction fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::OutputSymbolsAction ( ) const
inline

Definition at line 47 of file fstutils.mapper.hpp.

template<class Arc , class WeightMakerFunctorT >
uint fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::Properties ( uint  props) const
inline

Definition at line 53 of file fstutils.mapper.hpp.

Member Data Documentation

template<class Arc , class WeightMakerFunctorT >
WeightMakerFunctorT const& fst::GenericWeightAutoMapper< Arc, WeightMakerFunctorT >::mw_

Specialized functor that modifies arc weights.

Definition at line 58 of file fstutils.mapper.hpp.


The documentation for this class was generated from the following file: