Lines Matching refs:SignedLogWeightTpl

32 class SignedLogWeightTpl
44 typedef SignedLogWeightTpl<T> ReverseWeight;
46 SignedLogWeightTpl() : PairWeight<X1, X2>() {} in SignedLogWeightTpl() function
48 SignedLogWeightTpl(const SignedLogWeightTpl<T>& w) in SignedLogWeightTpl() function
51 SignedLogWeightTpl(const PairWeight<X1, X2>& w) in SignedLogWeightTpl() function
54 SignedLogWeightTpl(const X1& x1, const X2& x2) in SignedLogWeightTpl() function
57 static const SignedLogWeightTpl<T> &Zero() { in Zero()
58 static const SignedLogWeightTpl<T> zero(X1(1.0), X2::Zero()); in Zero()
62 static const SignedLogWeightTpl<T> &One() { in One()
63 static const SignedLogWeightTpl<T> one(X1(1.0), X2::One()); in One()
67 static const SignedLogWeightTpl<T> &NoWeight() { in NoWeight()
68 static const SignedLogWeightTpl<T> no_weight(X1(1.0), X2::NoWeight()); in NoWeight()
108 inline SignedLogWeightTpl<T> Plus(const SignedLogWeightTpl<T> &w1, in Plus()
109 const SignedLogWeightTpl<T> &w2) { in Plus()
111 return SignedLogWeightTpl<T>::NoWeight(); in Plus()
122 return SignedLogWeightTpl<T>(w1.Value1(), (f2 - log(2.0F))); in Plus()
124 return SignedLogWeightTpl<T>::Zero(); in Plus()
127 return SignedLogWeightTpl<T>( in Plus()
130 return SignedLogWeightTpl<T>( in Plus()
135 return SignedLogWeightTpl<T>( in Plus()
138 return SignedLogWeightTpl<T>( in Plus()
145 inline SignedLogWeightTpl<T> Minus(const SignedLogWeightTpl<T> &w1, in Minus()
146 const SignedLogWeightTpl<T> &w2) { in Minus()
147 SignedLogWeightTpl<T> minus_w2(-w2.Value1().Value(), w2.Value2()); in Minus()
152 inline SignedLogWeightTpl<T> Times(const SignedLogWeightTpl<T> &w1, in Times()
153 const SignedLogWeightTpl<T> &w2) { in Times()
155 return SignedLogWeightTpl<T>::NoWeight(); in Times()
161 return SignedLogWeightTpl<T>(TropicalWeight(1.0), (f1 + f2)); in Times()
163 return SignedLogWeightTpl<T>(TropicalWeight(-1.0), (f1 + f2)); in Times()
167 inline SignedLogWeightTpl<T> Divide(const SignedLogWeightTpl<T> &w1,
168 const SignedLogWeightTpl<T> &w2,
171 return SignedLogWeightTpl<T>::NoWeight();
177 return SignedLogWeightTpl<T>(TropicalWeight(1.0),
180 return SignedLogWeightTpl<T>(TropicalWeight(1.0),
183 return SignedLogWeightTpl<T>(TropicalWeight(1.0), (f1 - f2));
185 return SignedLogWeightTpl<T>(TropicalWeight(-1.0), (f1 - f2));
189 inline bool ApproxEqual(const SignedLogWeightTpl<T> &w1,
190 const SignedLogWeightTpl<T> &w2,
203 inline bool operator==(const SignedLogWeightTpl<T> &w1,
204 const SignedLogWeightTpl<T> &w2) {
216 typedef SignedLogWeightTpl<float> SignedLogWeight;
218 typedef SignedLogWeightTpl<double> SignedLog64Weight;