Home | History | Annotate | Download | only in lib

Lines Matching refs:arc

34 // An arc of weight w, with an origin state of potential p and
38 template <class Arc>
39 void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential,
41 typedef typename Arc::Weight Weight;
58 for (StateIterator< MutableFst<Arc> > sit(*fst);
61 typename Arc::StateId state = sit.Value();
62 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state);
65 Arc arc = ait.Value();
67 (potential[arc.nextstate] == Weight::Zero()))
71 arc.weight = Divide(Times(arc.weight, potential[arc.nextstate]),
74 && (potential[arc.nextstate] != Weight::Zero()))
75 arc.weight = Divide(Times(potential[state], arc.weight),
76 potential[arc.nextstate], DIVIDE_RIGHT);
77 ait.SetValue(arc);
90 typename Arc::StateId state = fst->Start();
91 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state);
94 Arc arc = ait.Value();
96 arc.weight = Times(potential[state], arc.weight);
98 arc.weight = Times(
100 arc.weight);
101 ait.SetValue(arc);
111 typename Arc::StateId state = fst->AddState();
115 Arc arc (0, 0, w, fst->Start());
116 fst->AddArc(state, arc);