Classes | |
struct | EquivalenceSorter |
Public Types | |
typedef CompactLatticeWeightTpl< Weight, IntType > | CompactWeight |
typedef ArcTpl< CompactWeight > | CompactArc |
typedef CompactArc::StateId | StateId |
typedef CompactArc::Label | Label |
typedef size_t | HashType |
Public Member Functions | |
CompactLatticeMinimizer (MutableFst< CompactArc > *clat, float delta=fst::kDelta) | |
bool | Minimize () |
void | ComputeStateHashValues () |
bool | Equivalent (StateId s, StateId t) const |
void | ComputeStateMap () |
void | ModifyModel () |
Static Public Member Functions | |
static HashType | ConvertStringToHashValue (const std::vector< IntType > &vec) |
static void | InitHashValue (const CompactWeight &final_weight, HashType *h) |
static void | UpdateHashValueForTransition (const CompactWeight &weight, Label label, HashType &next_state_hash, HashType *h) |
Private Attributes | |
MutableFst< ArcTpl< CompactLatticeWeightTpl< Weight, IntType > > > * | clat_ |
float | delta_ |
std::vector< HashType > | state_hashes_ |
std::vector< StateId > | state_map_ |
Definition at line 38 of file minimize-lattice.cc.
typedef ArcTpl<CompactWeight> CompactArc |
Definition at line 41 of file minimize-lattice.cc.
typedef CompactLatticeWeightTpl<Weight, IntType> CompactWeight |
Definition at line 40 of file minimize-lattice.cc.
Definition at line 44 of file minimize-lattice.cc.
typedef CompactArc::Label Label |
Definition at line 43 of file minimize-lattice.cc.
typedef CompactArc::StateId StateId |
Definition at line 42 of file minimize-lattice.cc.
|
inline |
Definition at line 46 of file minimize-lattice.cc.
|
inline |
Definition at line 96 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::clat_, CompactLatticeMinimizer< Weight, IntType >::InitHashValue(), KALDI_ASSERT, KALDI_WARN, CompactLatticeMinimizer< Weight, IntType >::state_hashes_, and CompactLatticeMinimizer< Weight, IntType >::UpdateHashValueForTransition().
Referenced by CompactLatticeMinimizer< Weight, IntType >::Minimize().
|
inline |
Definition at line 190 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::clat_, CompactLatticeMinimizer< Weight, IntType >::Equivalent(), rnnlm::i, KALDI_ASSERT, KALDI_WARN, CompactLatticeMinimizer< Weight, IntType >::state_hashes_, and CompactLatticeMinimizer< Weight, IntType >::state_map_.
Referenced by CompactLatticeMinimizer< Weight, IntType >::Minimize().
|
inlinestatic |
Definition at line 65 of file minimize-lattice.cc.
Referenced by CompactLatticeMinimizer< Weight, IntType >::InitHashValue(), and CompactLatticeMinimizer< Weight, IntType >::UpdateHashValueForTransition().
Definition at line 148 of file minimize-lattice.cc.
References fst::ApproxEqual(), CompactLatticeMinimizer< Weight, IntType >::clat_, CompactLatticeMinimizer< Weight, IntType >::delta_, rnnlm::i, KALDI_ASSERT, and CompactLatticeMinimizer< Weight, IntType >::state_map_.
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateMap().
|
inlinestatic |
Definition at line 75 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::ConvertStringToHashValue(), CompactLatticeWeightTpl< WeightType, IntType >::String(), and CompactLatticeWeightTpl< WeightType, IntType >::Zero().
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateHashValues().
|
inline |
Definition at line 50 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::clat_, CompactLatticeMinimizer< Weight, IntType >::ComputeStateHashValues(), CompactLatticeMinimizer< Weight, IntType >::ComputeStateMap(), KALDI_WARN, and CompactLatticeMinimizer< Weight, IntType >::ModifyModel().
Referenced by fst::MinimizeCompactLattice().
|
inline |
Definition at line 235 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::clat_, KALDI_VLOG, and CompactLatticeMinimizer< Weight, IntType >::state_map_.
Referenced by CompactLatticeMinimizer< Weight, IntType >::Minimize().
|
inlinestatic |
Definition at line 84 of file minimize-lattice.cc.
References CompactLatticeMinimizer< Weight, IntType >::ConvertStringToHashValue(), and CompactLatticeWeightTpl< WeightType, IntType >::String().
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateHashValues().
|
private |
Definition at line 265 of file minimize-lattice.cc.
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateHashValues(), CompactLatticeMinimizer< Weight, IntType >::ComputeStateMap(), CompactLatticeMinimizer< Weight, IntType >::Equivalent(), CompactLatticeMinimizer< Weight, IntType >::Minimize(), and CompactLatticeMinimizer< Weight, IntType >::ModifyModel().
|
private |
Definition at line 266 of file minimize-lattice.cc.
Referenced by CompactLatticeMinimizer< Weight, IntType >::Equivalent().
|
private |
Definition at line 267 of file minimize-lattice.cc.
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateHashValues(), and CompactLatticeMinimizer< Weight, IntType >::ComputeStateMap().
|
private |
Definition at line 268 of file minimize-lattice.cc.
Referenced by CompactLatticeMinimizer< Weight, IntType >::ComputeStateMap(), CompactLatticeMinimizer< Weight, IntType >::Equivalent(), and CompactLatticeMinimizer< Weight, IntType >::ModifyModel().