![]() |
Chaste
Release::3.4
|
#include <MathsCustomFunctions.hpp>
Collaboration diagram for CompareDoubles:Static Public Member Functions | |
| static bool | IsNearZero (double number, double tolerance) |
| static bool | WithinRelativeTolerance (double number1, double number2, double tolerance) |
| static bool | WithinAbsoluteTolerance (double number1, double number2, double tolerance) |
| static bool | WithinTolerance (double number1, double number2, double tolerance, bool toleranceIsAbsolute) |
| static bool | WithinAnyTolerance (double number1, double number2, double relTol=DBL_EPSILON, double absTol=DBL_EPSILON, bool printError=false) |
| static double | Difference (double number1, double number2, bool toleranceIsAbsolute) |
Utility static methods for comparing floating point numbers, based on boost/test/floating_point_comparison.hpp.
Definition at line 96 of file MathsCustomFunctions.hpp.
|
static |
| number1 | the first number to compare |
| number2 | the second number to compare |
| toleranceIsAbsolute | whether the tolerance is absolute (true) or relative (false) |
Definition at line 231 of file MathsCustomFunctions.cpp.
| number | the number to compare |
| tolerance | how close it must be |
Definition at line 155 of file MathsCustomFunctions.cpp.
Referenced by AbstractNonlinearAssemblerSolverHybrid< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ComputeJacobianNumerically().
|
static |
| number1 | the first number to compare |
| number2 | the second number to compare |
| tolerance | the absolute tolerance to use |
Definition at line 194 of file MathsCustomFunctions.cpp.
Referenced by WithinAnyTolerance(), and WithinTolerance().
|
static |
| number1 | the first number to compare |
| number2 | the second number to compare |
| relTol | the relative tolerance to compare under |
| absTol | the absolute tolerance to compare under |
| printError | whether to print an error message to stdout |
Definition at line 199 of file MathsCustomFunctions.cpp.
References WithinAbsoluteTolerance(), and WithinRelativeTolerance().
Referenced by NumericFileComparison::CompareFiles(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetUnsignedAttribute(), CvodeAdaptor::SetupCvode(), and AbstractCvodeSystem::SetupCvode().
|
static |
| number1 | the first number to compare |
| number2 | the second number to compare |
| tolerance | the relative tolerance to use |
Definition at line 185 of file MathsCustomFunctions.cpp.
Referenced by WithinAnyTolerance(), and WithinTolerance().
|
static |
| number1 | the first number to compare |
| number2 | the second number to compare |
| tolerance | the tolerance to use |
| toleranceIsAbsolute | whether the tolerance is absolute (true) or relative (false) |
Definition at line 211 of file MathsCustomFunctions.cpp.
References WithinAbsoluteTolerance(), and WithinRelativeTolerance().