#include <ogdf/basic/EpsilonTest.h>
Public Member Functions | |
EpsilonTest (double epsilon=1.0e-8) | |
Constructs an EpsilonTest with a given epsilon (double) for comparisons. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
template<typename T > | |
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. More... | |
Private Attributes | |
const double | eps |
Epsilon for floating point comparisons. More... | |
Definition at line 39 of file EpsilonTest.h.
|
inlineexplicit |
Constructs an EpsilonTest with a given epsilon (double) for comparisons.
Definition at line 45 of file EpsilonTest.h.
|
inline |
Compare if x is EQUAL to y for integral types.
x | is the left parameter of the operator EQUAL |
y | is the right parameter of the operator EQUAL |
Definition at line 107 of file EpsilonTest.h.
|
inline |
Compare if x is EQUAL to y for floating point types, using the given epsilon.
x | is the left parameter of the operator EQUAL |
y | is the right parameter of the operator EQUAL |
Definition at line 120 of file EpsilonTest.h.
|
inline |
Compare if x is GEQ to y for integral types.
x | is the left parameter of the operator GEQ |
y | is the right parameter of the operator GEQ |
Definition at line 133 of file EpsilonTest.h.
|
inline |
Compare if x is GEQ to y for floating point types, using the given epsilon.
x | is the left parameter of the operator GEQ |
y | is the right parameter of the operator GEQ |
Definition at line 146 of file EpsilonTest.h.
|
inline |
Compare if x is GREATER than y for integral types.
x | is the left parameter of the operator GREATER |
y | is the right parameter of the operator GREATER |
Definition at line 159 of file EpsilonTest.h.
|
inline |
Compare if x is GREATER than y for floating point types, using the given epsilon.
x | is the left parameter of the operator GREATER |
y | is the right parameter of the operator GREATER |
Definition at line 172 of file EpsilonTest.h.
|
inline |
Compare if x is LEQ than y for integral types.
x | is the left parameter of the operator LEQ |
y | is the right parameter of the operator LEQ |
Definition at line 81 of file EpsilonTest.h.
|
inline |
Compare if x is LEQ than y for floating point types, using the given epsilon.
x | is the left parameter of the operator LEQ |
y | is the right parameter of the operator LEQ |
Definition at line 94 of file EpsilonTest.h.
|
inline |
Compare if x is LESS than y for integral types.
x | is the left parameter of the operator LESS |
y | is the right parameter of the operator LESS |
Definition at line 55 of file EpsilonTest.h.
|
inline |
Compare if x is LESS than y for floating point types, using the given epsilon.
x | is the left parameter of the operator LESS |
y | is the right parameter of the operator LESS |
Definition at line 68 of file EpsilonTest.h.
|
private |
Epsilon for floating point comparisons.
Definition at line 41 of file EpsilonTest.h.