Lines Matching refs:ExpectationWeight
28 // ShortestDistance[Fst<ArcTpl<ExpectationWeight<P, V> > >]
49 class ExpectationWeight : public PairWeight<X1, X2> {
61 typedef ExpectationWeight<typename X1::ReverseWeight,
64 ExpectationWeight() : PairWeight<X1, X2>(Zero()) { }
66 ExpectationWeight(const ExpectationWeight<X1, X2>& w)
69 ExpectationWeight(const PairWeight<X1, X2>& w)
72 ExpectationWeight(const X1& x1, const X2& x2)
75 static const ExpectationWeight<X1, X2> &Zero() {
76 static const ExpectationWeight<X1, X2> zero(X1::Zero(), X2::Zero());
80 static const ExpectationWeight<X1, X2> &One() {
81 static const ExpectationWeight<X1, X2> one(X1::One(), X2::Zero());
85 static const ExpectationWeight<X1, X2> &NoWeight() {
86 static const ExpectationWeight<X1, X2> no_weight(X1::NoWeight(),
117 inline ExpectationWeight<X1, X2> Plus(const ExpectationWeight<X1, X2> &w,
118 const ExpectationWeight<X1, X2> &v) {
119 return ExpectationWeight<X1, X2>(Plus(w.Value1(), v.Value1()),
125 inline ExpectationWeight<X1, X2> Times(const ExpectationWeight<X1, X2> &w,
126 const ExpectationWeight<X1, X2> &v) {
127 return ExpectationWeight<X1, X2>(Times(w.Value1(), v.Value1()),
133 inline ExpectationWeight<X1, X2> Divide(const ExpectationWeight<X1, X2> &w,
134 const ExpectationWeight<X1, X2> &v,
136 FSTERROR() << "ExpectationWeight::Divide: not implemented";
137 return ExpectationWeight<X1, X2>::NoWeight();