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 true only if the related comparisons hold even if some numerical error appeared during the computations. | |
static bool | less (Value a, Value b) |
Returns true if a is surely strictly less than b . | |
static bool | different (Value a, Value b) |
Returns true if a is surely different from b . | |
static bool | positive (Value a) |
Returns true if a is surely positive. | |
static bool | negative (Value a) |
Returns true if a is surely negative. | |
static bool | nonZero (Value a) |
Returns true if a is surely non-zero. |