Home | History | Annotate | Download | only in lib

Lines Matching refs:TropicalWeight

116 class TropicalWeight : public FloatWeight {
118 typedef TropicalWeight ReverseWeight;
120 TropicalWeight() : FloatWeight() {}
122 TropicalWeight(float f) : FloatWeight(f) {}
124 TropicalWeight(const TropicalWeight &w) : FloatWeight(w) {}
126 static const TropicalWeight Zero() { return TropicalWeight(kPosInfinity); }
128 static const TropicalWeight One() { return TropicalWeight(0.0F); }
140 TropicalWeight Quantize(float delta = kDelta) const {
141 return TropicalWeight(floor(Value()/delta + 0.5F) * delta);
144 TropicalWeight Reverse() const { return *this; }
152 inline TropicalWeight Plus(const TropicalWeight &w1,
153 const TropicalWeight &w2) {
157 inline TropicalWeight Times(const TropicalWeight &w1,
158 const TropicalWeight &w2) {
165 return TropicalWeight(f1 + f2);
168 inline TropicalWeight Divide(const TropicalWeight &w1,
169 const TropicalWeight &w2,
177 return TropicalWeight(f1 - f2);