Define absolute and relative tolerances for comparison of real numbers (double) and check if they are positive.
More...
Define absolute and relative tolerances for comparison of real numbers (double) and check if they are positive.
◆ Tolerances() [1/2]
NumA::Tolerances::Tolerances |
( |
| ) |
|
Default constructor (tolerances equal to 0).
◆ Tolerances() [2/2]
NumA::Tolerances::Tolerances |
( |
double |
absoluteTolerance, |
|
|
double |
relativeTolerance |
|
) |
| |
Constructor.
- Parameters
-
absoluteTolerance | Absolute tolerance. |
relativeTolerance | Relative tolerance. |
◆ ~Tolerances()
NumA::Tolerances::~Tolerances |
( |
| ) |
|
|
virtual |
◆ getAbsoluteTolerance()
double NumA::Tolerances::getAbsoluteTolerance |
( |
| ) |
const |
- Returns
- Absolute tolerance.
◆ getRelativeTolerance()
double NumA::Tolerances::getRelativeTolerance |
( |
| ) |
const |
- Returns
- Relative tolerance.
◆ setAbsoluteTolerance()
void NumA::Tolerances::setAbsoluteTolerance |
( |
double |
absoluteTolerance | ) |
|
- Parameters
-
absoluteTolerance | Absolute tolerance. |
◆ setRelativeTolerance()
void NumA::Tolerances::setRelativeTolerance |
( |
double |
relativeTolerance | ) |
|
- Parameters
-
relativeTolerance | Relative tolerance. |
◆ testPositivity()
void NumA::Tolerances::testPositivity |
( |
const double & |
tolerance | ) |
const |
|
private |
◆ toString()
std::string NumA::Tolerances::toString |
( |
| ) |
const |
- Returns
- Pre-formatted string with the tolerances.
◆ m_absoluteTolerance
double NumA::Tolerances::m_absoluteTolerance |
|
private |
◆ m_relativeTolerance
double NumA::Tolerances::m_relativeTolerance |
|
private |
The documentation for this class was generated from the following files: