|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
35 #include <type_traits>
55 inline typename std::enable_if<std::is_integral<T>::value,
bool>
::type less(
const T& x,
68 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type less(
const T& x,
81 inline typename std::enable_if<std::is_integral<T>::value,
bool>
::type leq(
const T& x,
94 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type leq(
const T& x,
107 inline typename std::enable_if<std::is_integral<T>::value,
bool>
::type equal(
const T& x,
120 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type equal(
const T& x,
122 return leq(x, y) &&
geq(x, y);
133 inline typename std::enable_if<std::is_integral<T>::value,
bool>
::type geq(
const T& x,
146 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type geq(
const T& x,
148 return x > (y -
eps);
159 inline typename std::enable_if<std::is_integral<T>::value,
bool>
::type greater(
const T& x,
172 inline typename std::enable_if<std::is_floating_point<T>::value,
bool>
::type greater(
const T& x,
174 return x > (y +
eps);
The namespace for all OGDF objects.
const double eps
Epsilon for floating point comparisons.
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.
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.
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_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_integral< T >::value, bool >::type leq(const T &x, const T &y) const
Compare if x is LEQ than y for integral types.
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 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.