Lines Matching refs:w1
108 inline SignedLogWeightTpl<T> Plus(const SignedLogWeightTpl<T> &w1, in Plus() argument
110 if (!w1.Member() || !w2.Member()) in Plus()
112 bool s1 = w1.Value1().Value() > 0.0; in Plus()
114 T f1 = w1.Value2().Value(); in Plus()
119 return w1; in Plus()
122 return SignedLogWeightTpl<T>(w1.Value1(), (f2 - log(2.0F))); in Plus()
128 w1.Value1(), (f2 - log(1.0F + exp(f2 - f1)))); in Plus()
139 w1.Value1(), (f1 - log(1.0F - exp(f1 - f2)))); in Plus()
145 inline SignedLogWeightTpl<T> Minus(const SignedLogWeightTpl<T> &w1, in Minus() argument
148 return Plus(w1, minus_w2); in Minus()
152 inline SignedLogWeightTpl<T> Times(const SignedLogWeightTpl<T> &w1, in Times() argument
154 if (!w1.Member() || !w2.Member()) in Times()
156 bool s1 = w1.Value1().Value() > 0.0; in Times()
158 T f1 = w1.Value2().Value(); in Times()
167 inline SignedLogWeightTpl<T> Divide(const SignedLogWeightTpl<T> &w1,
170 if (!w1.Member() || !w2.Member())
172 bool s1 = w1.Value1().Value() > 0.0;
174 T f1 = w1.Value2().Value();
189 inline bool ApproxEqual(const SignedLogWeightTpl<T> &w1,
192 bool s1 = w1.Value1().Value() > 0.0;
195 return ApproxEqual(w1.Value2(), w2.Value2(), delta);
197 return w1.Value2() == LogWeightTpl<T>::Zero()
203 inline bool operator==(const SignedLogWeightTpl<T> &w1,
205 bool s1 = w1.Value1().Value() > 0.0;
208 return w1.Value2() == w2.Value2();
210 return (w1.Value2() == LogWeightTpl<T>::Zero()) &&