Lines Matching defs:arc
31 template<class Arc>
32 bool Verify(const Fst<Arc> &fst, bool allow_negative_labels = false) {
33 typedef typename Arc::Label Label;
34 typedef typename Arc::Weight Weight;
35 typedef typename Arc::StateId StateId;
43 for (StateIterator< Fst<Arc> > siter(fst);
56 for (StateIterator< Fst<Arc> > siter(fst);
61 for (ArcIterator< Fst<Arc> > aiter(fst, s);
64 const Arc &arc =aiter.Value();
65 if (!allow_negative_labels && arc.ilabel < 0) {
66 LOG(ERROR) << "Verify: Fst input label ID of arc at position "
69 } else if (isyms && isyms->Find(arc.ilabel) == "") {
70 LOG(ERROR) << "Verify: Fst input label ID " << arc.ilabel
71 << " of arc at position " << na << " of state " << s
75 } else if (!allow_negative_labels && arc.olabel < 0) {
76 LOG(ERROR) << "Verify: Fst output label ID of arc at position "
79 } else if (osyms && osyms->Find(arc.olabel) == "") {
80 LOG(ERROR) << "Verify: Fst output label ID " << arc.olabel
81 << " of arc at position " << na << " of state " << s
85 } else if (!arc.weight.Member() || arc.weight == Weight::Zero()) {
86 LOG(ERROR) << "Verify: Fst weight of arc at position "
89 } else if (arc.nextstate < 0) {
90 LOG(ERROR) << "Verify: Fst destination state ID of arc at position "
93 } else if (arc.nextstate >= ns) {
94 LOG(ERROR) << "Verify: Fst destination state ID of arc at position "