LatticeToStdMapper< Real > Class Template Reference

Class LatticeToStdMapper maps a LatticeArc to a normal arc (StdArc) by adding the elements of the LatticeArc weight. More...

#include <lattice-utils.h>

Public Member Functions

StdArc operator() (const LatticeArc &arc)
 
MapFinalAction FinalAction ()
 
MapSymbolsAction InputSymbolsAction ()
 
MapSymbolsAction OutputSymbolsAction ()
 
uint64 Properties (uint64 props)
 

Private Types

typedef LatticeWeightTpl< Real > LatticeWeight
 
typedef ArcTpl< LatticeWeightLatticeArc
 

Detailed Description

template<class Real>
class fst::LatticeToStdMapper< Real >

Class LatticeToStdMapper maps a LatticeArc to a normal arc (StdArc) by adding the elements of the LatticeArc weight.

Definition at line 226 of file lattice-utils.h.

Member Typedef Documentation

◆ LatticeArc

typedef ArcTpl<LatticeWeight> LatticeArc
private

Definition at line 228 of file lattice-utils.h.

◆ LatticeWeight

typedef LatticeWeightTpl<Real> LatticeWeight
private

Definition at line 227 of file lattice-utils.h.

Member Function Documentation

◆ FinalAction()

MapFinalAction FinalAction ( )
inline

Definition at line 235 of file lattice-utils.h.

235 { return MAP_NO_SUPERFINAL; }

◆ InputSymbolsAction()

MapSymbolsAction InputSymbolsAction ( )
inline

Definition at line 237 of file lattice-utils.h.

237 { return MAP_COPY_SYMBOLS; }

◆ operator()()

StdArc operator() ( const LatticeArc arc)
inline

Definition at line 230 of file lattice-utils.h.

230  {
231  return StdArc(arc.ilabel, arc.olabel,
232  StdArc::Weight(arc.weight.Value1() + arc.weight.Value2()),
233  arc.nextstate);
234  }
fst::StdArc StdArc
fst::StdArc::Weight Weight

◆ OutputSymbolsAction()

MapSymbolsAction OutputSymbolsAction ( )
inline

Definition at line 239 of file lattice-utils.h.

239 { return MAP_COPY_SYMBOLS; }

◆ Properties()

uint64 Properties ( uint64  props)
inline

Definition at line 242 of file lattice-utils.h.

References fst::PruneCompactLattice().

242 { return props; }

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