• Home
  • Raw
  • Download

Lines Matching refs:LogWeightTpl

310 class LogWeightTpl : public FloatWeightTpl<T> {
314 typedef LogWeightTpl ReverseWeight;
316 LogWeightTpl() : FloatWeightTpl<T>() {} in LogWeightTpl() function
318 LogWeightTpl(T f) : FloatWeightTpl<T>(f) {} in LogWeightTpl() function
320 LogWeightTpl(const LogWeightTpl<T> &w) : FloatWeightTpl<T>(w) {} in LogWeightTpl() function
322 static const LogWeightTpl<T> Zero() { in Zero()
323 return LogWeightTpl<T>(FloatLimits<T>::kPosInfinity); in Zero()
326 static const LogWeightTpl<T> One() { in One()
327 return LogWeightTpl<T>(0.0F); in One()
330 static const LogWeightTpl<T> NoWeight() { in NoWeight()
331 return LogWeightTpl<T>(FloatLimits<T>::kNumberBad); } in NoWeight()
343 LogWeightTpl<T> Quantize(float delta = kDelta) const {
349 return LogWeightTpl<T>(floor(Value()/delta + 0.5F) * delta);
352 LogWeightTpl<T> Reverse() const { return *this; } in Reverse()
360 typedef LogWeightTpl<float> LogWeight;
362 typedef LogWeightTpl<double> Log64Weight;
368 inline LogWeightTpl<T> Plus(const LogWeightTpl<T> &w1, in Plus()
369 const LogWeightTpl<T> &w2) { in Plus()
376 return LogWeightTpl<T>(f2 - LogExp(f1 - f2)); in Plus()
378 return LogWeightTpl<T>(f1 - LogExp(f2 - f1)); in Plus()
381 inline LogWeightTpl<float> Plus(const LogWeightTpl<float> &w1, in Plus()
382 const LogWeightTpl<float> &w2) { in Plus()
386 inline LogWeightTpl<double> Plus(const LogWeightTpl<double> &w1, in Plus()
387 const LogWeightTpl<double> &w2) { in Plus()
392 inline LogWeightTpl<T> Times(const LogWeightTpl<T> &w1, in Times()
393 const LogWeightTpl<T> &w2) { in Times()
395 return LogWeightTpl<T>::NoWeight(); in Times()
402 return LogWeightTpl<T>(f1 + f2); in Times()
405 inline LogWeightTpl<float> Times(const LogWeightTpl<float> &w1, in Times()
406 const LogWeightTpl<float> &w2) { in Times()
410 inline LogWeightTpl<double> Times(const LogWeightTpl<double> &w1, in Times()
411 const LogWeightTpl<double> &w2) { in Times()
416 inline LogWeightTpl<T> Divide(const LogWeightTpl<T> &w1,
417 const LogWeightTpl<T> &w2,
420 return LogWeightTpl<T>::NoWeight();
427 return LogWeightTpl<T>(f1 - f2);
430 inline LogWeightTpl<float> Divide(const LogWeightTpl<float> &w1,
431 const LogWeightTpl<float> &w2,
436 inline LogWeightTpl<double> Divide(const LogWeightTpl<double> &w1,
437 const LogWeightTpl<double> &w2,