#include <functional.h>
Collaboration diagram for dlr::common::ApproximatelyEqualFunctor< Type >:

Public Member Functions | |
| ApproximatelyEqualFunctor (const Type &epsilon=static_cast< Type >(0)) | |
| The constructor sets the threshold for what is considered approximately equal. | |
| bool | operator() (const Type &argument0, const Type &argument1) |
| The application operator returns true if the difference between its two arguments is less than epsilon and greater than -(epsilon), where epsilon is specified in the constructor. | |
| template<> | |
| bool | operator() (const bool &argument0, const bool &argument1) |
| template<> | |
| bool | operator() (const size_t &argument0, const size_t &argument1) |
Protected Attributes | |
| Type | m_epsilon |
| This protected member function stores the comparison tolerance. | |
This is just like std::equal<>, except that it has the additional capability of allowing for numerical precision in its comparisons.
Definition at line 264 of file dlrCommon/functional.h.
| dlr::common::ApproximatelyEqualFunctor< Type >::ApproximatelyEqualFunctor | ( | const Type & | epsilon = static_cast<Type>(0) |
) | [inline] |
The constructor sets the threshold for what is considered approximately equal.
For example, if the constructor argument is 1.0E-6, then two values will be considered equal if the absolute value of their difference is less than or equal to 1.0E-6.
| epsilon | This argument sets the largest difference that will be considered equivalent. |
Definition at line 278 of file dlrCommon/functional.h.
| bool dlr::common::ApproximatelyEqualFunctor< Type >::operator() | ( | const Type & | argument0, | |
| const Type & | argument1 | |||
| ) | [inline] |
The application operator returns true if the difference between its two arguments is less than epsilon and greater than -(epsilon), where epsilon is specified in the constructor.
| argument0 | This argument will be compared with the second argument. | |
| argument1 | This argument will be compared with the first argument. |
Definition at line 296 of file dlrCommon/functional.h.
References dlr::common::ApproximatelyEqualFunctor< Type >::m_epsilon.
Type dlr::common::ApproximatelyEqualFunctor< Type >::m_epsilon [protected] |
This protected member function stores the comparison tolerance.
Definition at line 304 of file dlrCommon/functional.h.
Referenced by dlr::common::ApproximatelyEqualFunctor< Type >::operator()().
1.5.2