Home | History | Annotate | Download | only in lib

Lines Matching refs:state

31 // distributive when reweighting towards the initial state and right
34 // An arc of weight w, with an origin state of potential p and
35 // destination state of potential q, is reweighted by p\wq when
36 // reweighting towards the initial state and by pw/q when reweighting
54 LOG(FATAL) << "Reweight: Reweighting to the initial state requires "
61 typename Arc::StateId state = sit.Value();
62 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state);
66 if ((potential[state] == Weight::Zero()) ||
70 && (potential[state] != Weight::Zero()))
72 potential[state], DIVIDE_LEFT);
75 arc.weight = Divide(Times(potential[state], arc.weight),
80 && (potential[state] != Weight::Zero()))
81 fst->SetFinal(state,
82 Divide(fst->Final(state), potential[state], DIVIDE_LEFT));
84 fst->SetFinal(state, Times(potential[state], fst->Final(state)));
90 typename Arc::StateId state = fst->Start();
91 for (MutableArcIterator< MutableFst<Arc> > ait(fst, state);
96 arc.weight = Times(potential[state], arc.weight);
99 Divide(Weight::One(), potential[state], DIVIDE_RIGHT),
104 fst->SetFinal(state, Times(potential[state], fst->Final(state)));
106 fst->SetFinal(state, Times(Divide(Weight::One(), potential[state],
108 fst->Final(state)));
111 typename Arc::StateId state = fst->AddState();
116 fst->AddArc(state, arc);
117 fst->SetStart(state);