|
ad_physics
|
DataType Probability. More...
#include <ad/physics/Probability.hpp>
Public Member Functions | |
| Probability () | |
| default constructor More... | |
| _AD_PHYSICS_PROBABILITY_EXPLICIT_CONVERSION_ | Probability (double const iProbability) |
| standard constructor More... | |
| Probability (const Probability &other)=default | |
| standard copy constructor | |
| Probability (Probability &&other)=default | |
| standard move constructor | |
| Probability & | operator= (const Probability &other)=default |
| standard assignment operator More... | |
| Probability & | operator= (Probability &&other)=default |
| standard move operator More... | |
| bool | operator== (const Probability &other) const |
| standard comparison operator More... | |
| bool | operator!= (const Probability &other) const |
| standard comparison operator More... | |
| bool | operator> (const Probability &other) const |
| standard comparison operator More... | |
| bool | operator< (const Probability &other) const |
| standard comparison operator More... | |
| bool | operator>= (const Probability &other) const |
| standard comparison operator More... | |
| bool | operator<= (const Probability &other) const |
| standard comparison operator More... | |
| Probability | operator+ (const Probability &other) const |
| standard arithmetic operator More... | |
| Probability & | operator+= (const Probability &other) |
| standard arithmetic operator More... | |
| Probability | operator- (const Probability &other) const |
| standard arithmetic operator More... | |
| Probability | operator-= (const Probability &other) |
| standard arithmetic operator More... | |
| Probability | operator* (const double &scalar) const |
| standard arithmetic operator More... | |
| Probability | operator/ (const double &scalar) const |
| standard arithmetic operator More... | |
| double | operator/ (const Probability &other) const |
| standard arithmetic operator More... | |
| Probability | operator- () const |
| standard arithmetic operator More... | |
| _AD_PHYSICS_PROBABILITY_EXPLICIT_CONVERSION_ | operator double () const |
| conversion to base type: double More... | |
| bool | isValid () const |
| void | ensureValid () const |
| ensure that the Probability is valid More... | |
| void | ensureValidNonZero () const |
| ensure that the Probability is valid and non zero More... | |
Static Public Member Functions | |
| static Probability | getMin () |
| get minimum valid Probability (i.e. cMinValue) | |
| static Probability | getMax () |
| get maximum valid Probability (i.e. cMaxValue) | |
| static Probability | getPrecision () |
| get assumed accuracy of Probability (i.e. cPrecisionValue) | |
Static Public Attributes | |
| static const double | cMinValue |
| constant defining the minimum valid Probability value (used in isValid()) | |
| static const double | cMaxValue |
| constant defining the maximum valid Probability value (used in isValid()) | |
| static const double | cPrecisionValue |
| constant defining the assumed Probability value accuracy (used in comparison operator==(), operator!=()) | |
DataType Probability.
A probability value in the range of [0.0; 1.0].
|
inline |
default constructor
The default value of Probability is: std::numeric_limits<double>::quiet_NaN()
|
inline |
standard constructor
|
inline |
ensure that the Probability is valid
Throws an std::out_of_range() exception if the Probability in not valid (i.e. isValid() returns false)
|
inline |
ensure that the Probability is valid and non zero
Throws an std::out_of_range() exception if the Probability in not valid or zero (i.e. isValid() returns false)
|
inline |
true if the Probability in a valid rangeAn Probability value is defined to be valid if:
|
inline |
conversion to base type: double
|
inline |
standard comparison operator
| [in] | other | Other Probability. |
true if one of the Probability is not valid or they can be taken as numerically different
|
inline |
standard arithmetic operator
| [in] | scalar | Scalar double value |
value or the result of the operation is not valid
|
inline |
standard arithmetic operator
| [in] | other | Other Probability |
|
inline |
standard arithmetic operator
| [in] | other | Other Probability |
|
inline |
standard arithmetic operator
|
inline |
standard arithmetic operator
| [in] | other | Other Probability |
|
inline |
standard arithmetic operator
| [in] | other | Other Probability |
|
inline |
standard arithmetic operator
| [in] | scalar | Scalar double value |
|
inline |
standard arithmetic operator
| [in] | other | Other Probability |
|
inline |
standard comparison operator
| [in] | other | Other Probability. |
true if both Probability are valid and this Probability is strictly numerically smaller than other.
|
inline |
standard comparison operator
| [in] | other | Other Probability |
true if both Probability are valid and this Probability is numerically smaller than other.
|
default |
standard assignment operator
| [in] | other | Other Probability |
|
default |
|
inline |
standard comparison operator
| [in] | other | Other Probability |
true if both Probability are valid and can be taken as numerically equal
|
inline |
standard comparison operator
| [in] | other | Other Probability. |
true if both Probability are valid and this Probability is strictly numerically greater than other.
|
inline |
standard comparison operator
| [in] | other | Other Probability. |
true if both Probability are valid and this Probability is numerically greater than other.
1.8.17