Home | History | Annotate | Download | only in lib

Lines Matching refs:Arc

46   // Encoded data consists of arc input/output labels and arc weight
111 // Given an arc encode either input/ouptut labels or input/costs or both
112 Label Encode(const A &arc) {
113 const Tuple tuple(arc.ilabel,
114 flags_ & kEncodeLabels ? arc.olabel : 0,
115 flags_ & kEncodeWeights ? arc.weight : Weight::One());
126 // Given an encode arc Label decode back to input/output labels and costs
230 A operator()(const A &arc) {
232 if ((arc.nextstate == kNoStateId && !(flags_ & kEncodeWeights)) ||
233 (arc.nextstate == kNoStateId && (flags_ & kEncodeWeights) &&
234 arc.weight == Weight::Zero())) {
235 return arc;
237 Label label = table_->Encode(arc);
239 flags_ & kEncodeLabels ? label : arc.olabel,
240 flags_ & kEncodeWeights ? Weight::One() : arc.weight,
241 arc.nextstate);
244 if (arc.nextstate == kNoStateId) {
245 return arc;
248 table_->Decode(arc.ilabel);
250 flags_ & kEncodeLabels ? tuple->olabel : arc.olabel,
251 flags_ & kEncodeWeights ? tuple->weight : arc.weight,
252 arc.nextstate);;
337 // time to visit an input state or arc.
341 typedef A Arc;
362 // time to visit an input state or arc.
366 typedef A Arc;