FST  openfst-1.7.2
OpenFst Library
Classes | Public Types | Public Member Functions | List of all members
fst::ReplaceUtil< Arc > Class Template Reference

#include <replace-util.h>

Public Types

using Label = typename Arc::Label
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using FstPair = std::pair< Label, const Fst< Arc > * >
 
using MutableFstPair = std::pair< Label, MutableFst< Arc > * >
 
using NonTerminalHash = std::unordered_map< Label, Label >
 

Public Member Functions

 ReplaceUtil (const std::vector< MutableFstPair > &fst_pairs, const ReplaceUtilOptions &opts)
 
 ReplaceUtil (const std::vector< FstPair > &fst_pairs, const ReplaceUtilOptions &opts)
 
 ReplaceUtil (const std::vector< std::unique_ptr< const Fst< Arc >>> &fst_array, const NonTerminalHash &nonterminal_hash, const ReplaceUtilOptions &opts)
 
 ~ReplaceUtil ()
 
bool CyclicDependencies () const
 
StateId SCC (Label label) const
 
uint8 SCCProperties (StateId scc_id)
 
bool Connected () const
 
void Connect ()
 
void ReplaceLabels (const std::vector< Label > &labels)
 
void ReplaceBySize (size_t nstates, size_t narcs, size_t nnonterms)
 
void ReplaceTrivial ()
 
void ReplaceByInstances (size_t ninstances)
 
void ReplaceUnique ()
 
void GetFstPairs (std::vector< FstPair > *fst_pairs)
 
void GetMutableFstPairs (std::vector< MutableFstPair > *mutable_fst_pairs)
 

Detailed Description

template<class Arc>
class fst::ReplaceUtil< Arc >

Definition at line 89 of file replace-util.h.

Member Typedef Documentation

template<class Arc>
using fst::ReplaceUtil< Arc >::FstPair = std::pair<Label, const Fst<Arc> *>

Definition at line 95 of file replace-util.h.

template<class Arc>
using fst::ReplaceUtil< Arc >::Label = typename Arc::Label

Definition at line 91 of file replace-util.h.

template<class Arc>
using fst::ReplaceUtil< Arc >::MutableFstPair = std::pair<Label, MutableFst<Arc> *>

Definition at line 96 of file replace-util.h.

template<class Arc>
using fst::ReplaceUtil< Arc >::NonTerminalHash = std::unordered_map<Label, Label>

Definition at line 97 of file replace-util.h.

template<class Arc>
using fst::ReplaceUtil< Arc >::StateId = typename Arc::StateId

Definition at line 92 of file replace-util.h.

template<class Arc>
using fst::ReplaceUtil< Arc >::Weight = typename Arc::Weight

Definition at line 93 of file replace-util.h.

Constructor & Destructor Documentation

template<class Arc >
fst::ReplaceUtil< Arc >::ReplaceUtil ( const std::vector< MutableFstPair > &  fst_pairs,
const ReplaceUtilOptions opts 
)

Definition at line 246 of file replace-util.h.

template<class Arc >
fst::ReplaceUtil< Arc >::ReplaceUtil ( const std::vector< FstPair > &  fst_pairs,
const ReplaceUtilOptions opts 
)

Definition at line 272 of file replace-util.h.

template<class Arc >
fst::ReplaceUtil< Arc >::ReplaceUtil ( const std::vector< std::unique_ptr< const Fst< Arc >>> &  fst_array,
const NonTerminalHash nonterminal_hash,
const ReplaceUtilOptions opts 
)

Definition at line 296 of file replace-util.h.

template<class Arc>
fst::ReplaceUtil< Arc >::~ReplaceUtil ( )
inline

Definition at line 112 of file replace-util.h.

Member Function Documentation

template<class Arc >
void fst::ReplaceUtil< Arc >::Connect ( )

Definition at line 420 of file replace-util.h.

template<class Arc>
bool fst::ReplaceUtil< Arc >::Connected ( ) const
inline

Definition at line 144 of file replace-util.h.

template<class Arc>
bool fst::ReplaceUtil< Arc >::CyclicDependencies ( ) const
inline

Definition at line 118 of file replace-util.h.

template<class Arc >
void fst::ReplaceUtil< Arc >::GetFstPairs ( std::vector< FstPair > *  fst_pairs)

Definition at line 549 of file replace-util.h.

template<class Arc >
void fst::ReplaceUtil< Arc >::GetMutableFstPairs ( std::vector< MutableFstPair > *  mutable_fst_pairs)

Definition at line 561 of file replace-util.h.

template<class Arc >
void fst::ReplaceUtil< Arc >::ReplaceByInstances ( size_t  ninstances)

Definition at line 530 of file replace-util.h.

template<class Arc >
void fst::ReplaceUtil< Arc >::ReplaceBySize ( size_t  nstates,
size_t  narcs,
size_t  nnonterms 
)

Definition at line 509 of file replace-util.h.

template<class Arc >
void fst::ReplaceUtil< Arc >::ReplaceLabels ( const std::vector< Label > &  labels)

Definition at line 459 of file replace-util.h.

template<class Arc>
void fst::ReplaceUtil< Arc >::ReplaceTrivial ( )
inline

Definition at line 168 of file replace-util.h.

template<class Arc>
void fst::ReplaceUtil< Arc >::ReplaceUnique ( )
inline

Definition at line 176 of file replace-util.h.

template<class Arc>
StateId fst::ReplaceUtil< Arc >::SCC ( Label  label) const
inline

Definition at line 125 of file replace-util.h.

template<class Arc>
uint8 fst::ReplaceUtil< Arc >::SCCProperties ( StateId  scc_id)
inline

Definition at line 137 of file replace-util.h.


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