• Home
  • Raw
  • Download

Lines Matching refs:X2

48 template <class X1, class X2>
49 class ExpectationWeight : public PairWeight<X1, X2> {
51 using PairWeight<X1, X2>::Value1;
52 using PairWeight<X1, X2>::Value2;
54 using PairWeight<X1, X2>::Reverse;
55 using PairWeight<X1, X2>::Quantize;
56 using PairWeight<X1, X2>::Member;
59 typedef X2 W2;
62 typename X2::ReverseWeight> ReverseWeight;
64 ExpectationWeight() : PairWeight<X1, X2>(Zero()) { } in ExpectationWeight()
66 ExpectationWeight(const ExpectationWeight<X1, X2>& w) in ExpectationWeight()
67 : PairWeight<X1, X2> (w) { } in ExpectationWeight()
69 ExpectationWeight(const PairWeight<X1, X2>& w) in ExpectationWeight()
70 : PairWeight<X1, X2> (w) { } in ExpectationWeight()
72 ExpectationWeight(const X1& x1, const X2& x2) in ExpectationWeight()
73 : PairWeight<X1, X2>(x1, x2) { } in ExpectationWeight()
75 static const ExpectationWeight<X1, X2> &Zero() { in Zero()
76 static const ExpectationWeight<X1, X2> zero(X1::Zero(), X2::Zero()); in Zero()
80 static const ExpectationWeight<X1, X2> &One() { in One()
81 static const ExpectationWeight<X1, X2> one(X1::One(), X2::Zero()); in One()
85 static const ExpectationWeight<X1, X2> &NoWeight() { in NoWeight()
86 static const ExpectationWeight<X1, X2> no_weight(X1::NoWeight(), in NoWeight()
87 X2::NoWeight()); in NoWeight()
92 static const string type = "expectation_" + X1::Type() + "_" + X2::Type(); in Type()
96 PairWeight<X1, X2> Quantize(float delta = kDelta) const {
97 return PairWeight<X1, X2>::Quantize();
101 return PairWeight<X1, X2>::Reverse(); in Reverse()
105 return PairWeight<X1, X2>::Member(); in Member()
116 template <class X1, class X2>
117 inline ExpectationWeight<X1, X2> Plus(const ExpectationWeight<X1, X2> &w, in Plus()
118 const ExpectationWeight<X1, X2> &v) { in Plus()
119 return ExpectationWeight<X1, X2>(Plus(w.Value1(), v.Value1()), in Plus()
124 template <class X1, class X2>
125 inline ExpectationWeight<X1, X2> Times(const ExpectationWeight<X1, X2> &w, in Times()
126 const ExpectationWeight<X1, X2> &v) { in Times()
127 return ExpectationWeight<X1, X2>(Times(w.Value1(), v.Value1()), in Times()
132 template <class X1, class X2>
133 inline ExpectationWeight<X1, X2> Divide(const ExpectationWeight<X1, X2> &w,
134 const ExpectationWeight<X1, X2> &v,
137 return ExpectationWeight<X1, X2>::NoWeight();