Home | History | Annotate | Download | only in fst

Lines Matching refs:MappedId

47 // disjoint, we map Arc::StateId on the type MappedId. The states of
58 typedef StateId MappedId; // ID for an equivalence class.
60 // MappedId for an implicit dead state.
61 static const MappedId kDeadState = 0;
63 // MappedId for lookup failure.
64 static const MappedId kInvalidId = -1;
69 static MappedId MapState(StateId s, int32 which_fst) {
75 (static_cast<MappedId>(s) << 1) + which_fst;
78 static StateId UnMapState(MappedId id) {
81 // Convenience function: checks if state with MappedId 's' is final
83 static bool IsFinal(const Fst<Arc> &fa, MappedId s) {
90 static MappedId FindSet(UnionFind<MappedId> *sets, MappedId id) {
91 MappedId repr = sets->FindSet(id);
102 typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kDeadState;
105 typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kInvalidId;
176 typedef typename Util::MappedId MappedId;
179 MappedId s1 = Util::MapState(fst1.Start(), FST1);
180 MappedId s2 = Util::MapState(fst2.Start(), FST2);
183 UnionFind<MappedId> eq_classes(1000, Util::kInvalidId);
190 // fst1 and fst2: input labels mapped to pairs of MappedId's
194 unordered_map<typename Arc::Label, pair<MappedId, MappedId> >
199 // Pairs of MappedId's to be processed, organized in a queue.
200 deque<pair<MappedId, MappedId> > q;
217 MappedId rep1 = Util::FindSet(&eq_classes, s1);
218 MappedId rep2 = Util::FindSet(&eq_classes, s2);
254 const pair<MappedId, MappedId> &p = arc_iter->second;