Lines Matching refs:LogWeight
182 class LogWeight : public FloatWeight {
184 typedef LogWeight ReverseWeight;
186 LogWeight() : FloatWeight() {} in LogWeight() function
188 LogWeight(float f) : FloatWeight(f) {} in LogWeight() function
190 LogWeight(const LogWeight &w) : FloatWeight(w) {} in LogWeight() function
192 static const LogWeight Zero() { return LogWeight(kPosInfinity); } in Zero()
194 static const LogWeight One() { return LogWeight(0.0F); } in One()
206 LogWeight Quantize(float delta = kDelta) const {
207 return LogWeight(floor(Value()/delta + 0.5F) * delta);
210 LogWeight Reverse() const { return *this; } in Reverse()
219 inline LogWeight Plus(const LogWeight &w1, const LogWeight &w2) { in Plus()
226 return LogWeight(f2 - LogExp(f1 - f2)); in Plus()
228 return LogWeight(f1 - LogExp(f2 - f1)); in Plus()
231 inline LogWeight Times(const LogWeight &w1, const LogWeight &w2) { in Times()
238 return LogWeight(f1 + f2); in Times()
241 inline LogWeight Divide(const LogWeight &w1,
242 const LogWeight &w2,
250 return LogWeight(f1 - f2);