Tolerance is a class to provide a basic way to handle the comparison of numbers that are obtained as a result of a probably inexact computation.
The general implementation is suitable only if the data type is exact, like the integer types, otherwise a specialized version must be implemented. These specialized classes like Tolerance<double> may offer additional tuning parameters.
#include <lemon/tolerance.h>
| Static Public Member Functions | |
| static Value | zero () | 
| Returns the zero value. | |
| Comparisons | |
| The concept is that these bool functions return  | |
| static bool | less (Value a, Value b) | 
| Returns trueifais surely strictly less thanb. | |
| static bool | different (Value a, Value b) | 
| Returns trueifais surely different fromb. | |
| static bool | positive (Value a) | 
| Returns trueifais surely positive. | |
| static bool | negative (Value a) | 
| Returns trueifais surely negative. | |
| static bool | nonZero (Value a) | 
| Returns trueifais surely non-zero. | |
 1.8.5
 1.8.5