Lines Matching defs:arc
38 // disjoint, we map Arc::StateId on the type MappedId. The states of
45 template <class Arc>
47 typedef typename Arc::StateId StateId;
48 typedef typename Arc::Weight Weight;
74 static bool IsFinal(const Fst<Arc> &fa, MappedId s) {
112 template <class Arc>
113 bool Equivalent(const Fst<Arc> &fst1, const Fst<Arc> &fst2) {
114 typedef typename Arc::Weight Weight;
128 VectorFst<Arc> efst1(fst1);
129 VectorFst<Arc> efst2(fst2);
132 Map(&efst1, QuantizeMapper<Arc>());
133 Map(&efst2, QuantizeMapper<Arc>());
134 EncodeMapper<Arc> mapper(kEncodeWeights|kEncodeLabels, ENCODE);
141 typedef typename Arc::StateId StateId;
142 typedef EquivalenceUtil<Arc> Util;
165 hash_map<typename Arc::Label, pair<MappedId, MappedId> >
191 ArcIterator<Fst<Arc> > arc_iter(fst1, Util::UnMapState(s1));
193 const Arc &arc = arc_iter.Value();
194 if (arc.weight != Weight::Zero()) { // Zero-weight arcs
197 arc_pairs[arc.ilabel].first = Util::MapState(arc.nextstate, FST1);
203 ArcIterator<Fst<Arc> > arc_iter(fst2, Util::UnMapState(s2));
205 const Arc &arc = arc_iter.Value();
206 if (arc.weight != Weight::Zero()) { // Zero-weight arcs
209 arc_pairs[arc.ilabel].second = Util::MapState(arc.nextstate, FST2);