Lines Matching defs:Arc
35 // A final weight is mapped to an arc to the superfinal state
40 // A final weight is mapped to an arc to the superfinal state
52 // // Maps an arc type A to arc type B.
53 // B operator()(const A &arc);
78 // Maps an arc type A using a mapper function object C, passed
100 const A &arc = aiter.Value();
101 aiter.SetValue((*mapper)(arc));
146 // Maps an arc type A using a mapper function object C, passed
154 // Maps an arc type A to an arc type B using mapper function
227 // Maps an arc type A to an arc type B using mapper function
265 typedef B Arc;
450 // Maps an arc type A to an arc type B using Mapper function object
459 typedef B Arc;
625 A operator()(const A &arc) const { return arc; }
640 A operator()(const A &arc) const { return arc; }
655 LogArc operator()(const StdArc &arc) const {
656 return LogArc(arc.ilabel, arc.olabel, arc.weight.Value(), arc.nextstate);
670 StdArc operator()(const LogArc &arc) const {
671 return StdArc(arc.ilabel, arc.olabel, arc.weight.Value(), arc.nextstate);
690 ToArc operator()(const A &arc) const {
691 // 'Super-final' arc.
692 if (arc.nextstate == kNoStateId && arc.weight != AW::Zero())
693 return ToArc(0, 0, GW(SW::One(), arc.weight), kNoStateId);
694 // 'Super-non-final' arc.
695 else if (arc.nextstate == kNoStateId)
696 return ToArc(0, 0, GW(SW::Zero(), arc.weight), kNoStateId);
698 else if (arc.olabel == 0)
699 return ToArc(arc.ilabel, arc.ilabel,
700 GW(SW::One(), arc.weight), arc.nextstate);
703 return ToArc(arc.ilabel, arc.ilabel,
704 GW(SW(arc.olabel), arc.weight), arc.nextstate);
726 A operator()(const FromArc &arc) const {
727 // 'Super-non-final' arc.
728 if (arc.nextstate == kNoStateId && arc.weight == GW::Zero())
729 return A(arc.ilabel, 0, AW::Zero(), kNoStateId);
731 SW w1 = arc.weight.Value1();
732 AW w2 = arc.weight.Value2();
739 CHECK(arc.ilabel == arc.olabel);
742 return A(arc.ilabel, l, w2, arc.nextstate);
780 A operator()(const FromArc &arc) {
781 // 'Super-non-final' arc.
782 if (arc.nextstate == kNoStateId && arc.weight == GW::Zero())
783 return A(arc.ilabel, 0, AW::Zero(), kNoStateId);
785 SW w1 = arc.weight.Value1();
786 AW w2 = arc.weight.Value2();
818 CHECK(arc.ilabel == arc.olabel);
820 return A(arc.ilabel, l, w2, arc.nextstate);
855 A operator()(const A &arc) const {
856 if (arc.weight == Weight::Zero())
857 return arc;
858 Weight w = Plus(arc.weight, weight_);
859 return A(arc.ilabel, arc.olabel, w, arc.nextstate);
879 A operator()(const A &arc) const {
880 if (arc.weight == Weight::Zero())
881 return arc;
882 Weight w = Times(arc.weight, weight_);
883 return A(arc.ilabel, arc.olabel, w, arc.nextstate);
904 B operator()(const A &arc) const {
905 ToWeight w = arc.weight != FromWeight::Zero() ?
907 return B(arc.ilabel, arc.olabel, w, arc.nextstate);
930 B operator()(const A &arc) const {
931 ToWeight w = arc.weight.Quantize(delta_);
932 return B(arc.ilabel, arc.olabel, w, arc.nextstate);
956 B operator()(const A &arc) const {
957 return B(arc.ilabel, arc.olabel, arc.weight.Reverse(), arc.nextstate);