Tolerance Class Template Reference
[Miscellaneous Tools]

#include <lemon/tolerance.h>

List of all members.


Detailed Description

template<class T>
class lemon::Tolerance< T >

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.

This is an abstract class, it should be specialized for all numerical data types. These specialized classes like Tolerance<double> may offer additional tuning parameters.

See also:
Tolerance<float>

Tolerance<double>

Tolerance<long double>

Tolerance<int>

Tolerance<long long int>

Tolerance<unsigned int>

Tolerance<unsigned long long int>


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.

The documentation for this class was generated from the following file:

Generated on Fri Jan 23 18:15:19 2009 for LEMON by  doxygen 1.5.6