Lines Matching defs:Weight
30 // vector in the direction defined by TYPE. Weight needs to be left
39 void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential,
41 typedef typename Arc::Weight Weight;
46 potential.push_back(Weight::Zero());
48 if (type == REWEIGHT_TO_FINAL && !(Weight::Properties() & kRightSemiring))
50 << "Weight to be right distributive: "
51 << Weight::Type();
53 if (type == REWEIGHT_TO_INITIAL && !(Weight::Properties() & kLeftSemiring))
55 << "Weight to be left distributive: "
56 << Weight::Type();
66 if ((potential[state] == Weight::Zero()) ||
67 (potential[arc.nextstate] == Weight::Zero()))
70 && (potential[state] != Weight::Zero()))
74 && (potential[arc.nextstate] != Weight::Zero()))
80 && (potential[state] != Weight::Zero()))
87 if ((potential[fst->Start()] != Weight::One()) &&
88 (potential[fst->Start()] != Weight::Zero())) {
99 Divide(Weight::One(), potential[state], DIVIDE_RIGHT),
106 fst->SetFinal(state, Times(Divide(Weight::One(), potential[state],
112 Weight w = type == REWEIGHT_TO_INITIAL ?
114 Divide(Weight::One(), potential[fst->Start()], DIVIDE_RIGHT);