Home | History | Annotate | Download | only in lib

Lines Matching defs:Arc

46   // Encoded data consists of arc input/output labels and arc weight
108 // Given an arc encode either input/ouptut labels or input/costs or both
109 Label Encode(const A &arc) {
110 const Tuple tuple(arc.ilabel,
111 flags_ & kEncodeLabels ? arc.olabel : 0,
112 flags_ & kEncodeWeights ? arc.weight : Weight::One());
123 // Given an encode arc Label decode back to input/output labels and costs
231 A operator()(const A &arc) {
233 if ((arc.nextstate == kNoStateId && !(flags_ & kEncodeWeights)) ||
234 (arc.nextstate == kNoStateId && (flags_ & kEncodeWeights) &&
235 arc.weight == Weight::Zero())) {
236 return arc;
238 Label label = table_->Encode(arc);
240 flags_ & kEncodeLabels ? label : arc.olabel,
241 flags_ & kEncodeWeights ? Weight::One() : arc.weight,
242 arc.nextstate);
245 if (arc.nextstate == kNoStateId) {
246 return arc;
249 table_->Decode(arc.ilabel);
251 flags_ & kEncodeLabels ? tuple->olabel : arc.olabel,
252 flags_ & kEncodeWeights ? tuple->weight : arc.weight,
253 arc.nextstate);;
338 // time to visit an input state or arc.
342 typedef A Arc;
363 // time to visit an input state or arc.
367 typedef A Arc;