Lines Matching refs:MinMaxWeightTpl
447 class MinMaxWeightTpl : public FloatWeightTpl<T> {
451 typedef MinMaxWeightTpl<T> ReverseWeight;
453 MinMaxWeightTpl() : FloatWeightTpl<T>() {}
455 MinMaxWeightTpl(T f) : FloatWeightTpl<T>(f) {}
457 MinMaxWeightTpl(const MinMaxWeightTpl<T> &w) : FloatWeightTpl<T>(w) {}
459 static const MinMaxWeightTpl<T> Zero() {
460 return MinMaxWeightTpl<T>(FloatLimits<T>::PosInfinity());
463 static const MinMaxWeightTpl<T> One() {
464 return MinMaxWeightTpl<T>(FloatLimits<T>::NegInfinity());
467 static const MinMaxWeightTpl<T> NoWeight() {
468 return MinMaxWeightTpl<T>(FloatLimits<T>::NumberBad()); }
481 MinMaxWeightTpl<T> Quantize(float delta = kDelta) const {
488 return MinMaxWeightTpl<T>(floor(Value()/delta + 0.5F) * delta);
491 MinMaxWeightTpl<T> Reverse() const { return *this; }
499 typedef MinMaxWeightTpl<float> MinMaxWeight;
503 inline MinMaxWeightTpl<T> Plus(
504 const MinMaxWeightTpl<T> &w1, const MinMaxWeightTpl<T> &w2) {
506 return MinMaxWeightTpl<T>::NoWeight();
510 inline MinMaxWeightTpl<float> Plus(
511 const MinMaxWeightTpl<float> &w1, const MinMaxWeightTpl<float> &w2) {
515 inline MinMaxWeightTpl<double> Plus(
516 const MinMaxWeightTpl<double> &w1, const MinMaxWeightTpl<double> &w2) {
522 inline MinMaxWeightTpl<T> Times(
523 const MinMaxWeightTpl<T> &w1, const MinMaxWeightTpl<T> &w2) {
525 return MinMaxWeightTpl<T>::NoWeight();
529 inline MinMaxWeightTpl<float> Times(
530 const MinMaxWeightTpl<float> &w1, const MinMaxWeightTpl<float> &w2) {
534 inline MinMaxWeightTpl<double> Times(
535 const MinMaxWeightTpl<double> &w1, const MinMaxWeightTpl<double> &w2) {
541 inline MinMaxWeightTpl<T> Divide(const MinMaxWeightTpl<T> &w1,
542 const MinMaxWeightTpl<T> &w2,
545 return MinMaxWeightTpl<T>::NoWeight();
550 inline MinMaxWeightTpl<float> Divide(const MinMaxWeightTpl<float> &w1,
551 const MinMaxWeightTpl<float> &w2,
556 inline MinMaxWeightTpl<double> Divide(const MinMaxWeightTpl<double> &w1,
557 const MinMaxWeightTpl<double> &w2,