Home | History | Annotate | Download | only in fst

Lines Matching refs:w1

108 inline SignedLogWeightTpl<T> Plus(const SignedLogWeightTpl<T> &w1,
110 if (!w1.Member() || !w2.Member())
112 bool s1 = w1.Value1().Value() > 0.0;
114 T f1 = w1.Value2().Value();
119 return w1;
122 return SignedLogWeightTpl<T>(w1.Value1(), (f2 - log(2.0F)));
128 w1.Value1(), (f2 - log(1.0F + exp(f2 - f1))));
139 w1.Value1(), (f1 - log(1.0F - exp(f1 - f2))));
145 inline SignedLogWeightTpl<T> Minus(const SignedLogWeightTpl<T> &w1,
148 return Plus(w1, minus_w2);
152 inline SignedLogWeightTpl<T> Times(const SignedLogWeightTpl<T> &w1,
154 if (!w1.Member() || !w2.Member())
156 bool s1 = w1.Value1().Value() > 0.0;
158 T f1 = w1.Value2().Value();
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()) &&
224 template <class W1, class W2>
225 bool SignedLogConvertCheck(W1 w) {
228 << W1::Type() << "\" to \"" << W2::Type();