57 inline typename std::enable_if<std::is_integral<T>::value,
bool>::type
less(
const T& x,
70 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>::type
less(
const T& x,
83 inline typename std::enable_if<std::is_integral<T>::value,
bool>::type
leq(
const T& x,
96 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>::type
leq(
const T& x,
109 inline typename std::enable_if<std::is_integral<T>::value,
bool>::type
equal(
const T& x,
122 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>::type
equal(
const T& x,
124 return leq(x, y) &&
geq(x, y);
135 inline typename std::enable_if<std::is_integral<T>::value,
bool>::type
geq(
const T& x,
148 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>::type
geq(
const T& x,
150 return x > (y -
eps);
161 inline typename std::enable_if<std::is_integral<T>::value,
bool>::type
greater(
const T& x,
174 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>::type
greater(
const T& x,
176 return x > (y +
eps);
Basic declarations, included by all source files.
std::enable_if< std::is_floating_point< T >::value, bool >::type less(const T &x, const T &y) const
Compare if x is LESS than y for floating point types, using the given epsilon.
std::enable_if< std::is_floating_point< T >::value, bool >::type equal(const T &x, const T &y) const
Compare if x is EQUAL to y for floating point types, using the given epsilon.
std::enable_if< std::is_integral< T >::value, bool >::type leq(const T &x, const T &y) const
Compare if x is LEQ than y for integral types.
std::enable_if< std::is_floating_point< T >::value, bool >::type leq(const T &x, const T &y) const
Compare if x is LEQ than y for floating point types, using the given epsilon.
std::enable_if< std::is_integral< T >::value, bool >::type geq(const T &x, const T &y) const
Compare if x is GEQ to y for integral types.
std::enable_if< std::is_integral< T >::value, bool >::type less(const T &x, const T &y) const
Compare if x is LESS than y for integral types.
const double eps
Epsilon for floating point comparisons.
EpsilonTest(double epsilon=1.0e-8)
Constructs an EpsilonTest with a given epsilon (double) for comparisons.
std::enable_if< std::is_integral< T >::value, bool >::type equal(const T &x, const T &y) const
Compare if x is EQUAL to y for integral types.
std::enable_if< std::is_floating_point< T >::value, bool >::type greater(const T &x, const T &y) const
Compare if x is GREATER than y for floating point types, using the given epsilon.
std::enable_if< std::is_floating_point< T >::value, bool >::type geq(const T &x, const T &y) const
Compare if x is GEQ to y for floating point types, using the given epsilon.
std::enable_if< std::is_integral< T >::value, bool >::type greater(const T &x, const T &y) const
Compare if x is GREATER than y for integral types.
The namespace for all OGDF objects.