Lines Matching defs:Weight
47 // typedef typename Arc::Weight Weight;
74 // // Gives an estimate of the combined weight of the paths P in the
76 // // A trivial implementation returns Weight::One(). Non-trivial
77 // // implementations are useful for weight-pushing in composition.
78 // Weight LookAheadWeight() const;
138 typedef typename A::Weight Weight;
141 : weight_(Weight::One()),
142 prefix_arc_(kNoLabel, kNoLabel, Weight::One(), kNoStateId) {}
152 Weight LookAheadWeight() const { return weight_; }
166 void SetLookAheadWeight(const Weight &w) { weight_ = w; }
175 StateId s) = 0; // This must set l.a. weight and
177 Weight weight_; // Look-ahead weight
191 typedef typename Arc::Weight Weight;
220 Weight LookAheadWeight() const { return Weight::One(); }
240 Weight LookAheadWeight_() const { return LookAheadWeight(); }
257 typedef typename Arc::Weight Weight;
345 SetLookAheadWeight(Weight::Zero());
348 if (fst_.Final(s_) != Weight::Zero() &&
349 lfst_->Final(s) != Weight::Zero()) {
364 SetLookAheadWeight(Plus(LookAheadWeight(), matcher_.Value().weight));
389 SetLookAheadWeight(Plus(LookAheadWeight(), arc.weight));
398 Times(arc.weight,
399 matcher_.Value().weight)));
408 SetLookAheadWeight(Weight::One()); // Avoids double counting.
430 typedef typename Arc::Weight Weight;
587 SetLookAheadWeight(Weight::One());
604 Weight lfinal = internal::Final(*lfst_, s);
605 bool reach_final = lfinal != Weight::Zero() && label_reachable_->ReachFinal();
714 typedef typename Arc::Weight Weight;
767 Weight LookAheadWeight() const {
772 return Weight::One();