This module provides common mathematical facilities.
This section allows you to access the C++ source files of the module.
The files listed below are included in the interface part of the module. So any module dependent of this module is also dependent of the files listed here.
The files listed below are needed by the implementation part of the module. But a module dependent of this module is not necessary dependent of the files listed here.
The namespaces listed below are integrated in this module. That means any element declared in one of those namespaces can now be directly used by or from this module.
Here are listed the types defined in the module. To use one of them, you have to specify the namespace of the module.
Here are listed the errors that are supported or generated by the module. To use one of them, you do not have to specify the namespace of the module.
erCardinalOverflow
The coding of cardinals is too small.
erEpsilonParameterMissing
The 'epsilon' parameter is missing.
erIntegerOverflow
The coding of integers is too small.
erInvalidBooleanString
Invalid boolean string.
erInvalidCardinalString
Invalid cardinal string.
erInvalidCharacterString
Invalid character string.
erInvalidComparisonString
Invalid comparison string.
erInvalidIntegerString
Invalid integer string.
erInvalidPercentage
The percentage is over a hundred.
erInvalidPointerString
Invalid pointer string.
erInvalidRealString
Invalid real string.
erZeroDivision
Can not perform a division by zero.
Here are listed the constants provided by the module. To use one of them, you have to specify the namespace of the module.
Here are listed the functions provided by the module. To use one of them, you have to specify the namespace of the module.
template <class prType> inline const prType & maxi(const prType & agObject1,const prType & agObject2)
Returns the maximum of two objects.
template <class prType> inline const prType & mini(const prType & agObject1,const prType & agObject2)
Returns the minimum of two objects.
template <class prType> inline void swap(prType & agObject1,prType & agObject2)
Swaps two objects.
inline tyBoolean isEqual(tyReal agNumber1,tyReal agNumber2)
Indicates if two real numbers are equal according to the standard precision.
inline tyBoolean isInferior(tyReal agNumber1,tyReal agNumber2)
Indicates if a real number is inferior to another one according to the standard precision.
inline tyBoolean isInferiorEqual(tyReal agNumber1,tyReal agNumber2)
Indicates if a real number is inferior or equal to another one according to the standard precision.
inline tyBoolean isSuperior(tyReal agNumber1,tyReal agNumber2)
Indicates if a real number is superior to another one according to the standard precision.
inline tyBoolean isSuperiorEqual(tyReal agNumber1,tyReal agNumber2)
Indicates if a real number is superior or equal to another one according to the standard precision.
inline tyReal floor(tyReal agNumber)
Returns the maximum integer value inferior or equal to a given real value according to the standard precision.
inline tyBoolean addOk(tyCardinal agNumber1,tyCardinal agNumber2)
Checks if the addition of two cardinals will not fail.
inline tyBoolean addOk(tyInteger agNumber1,tyInteger agNumber2)
Checks if the addition of two integers will not fail.
inline tyBoolean mulOk(tyCardinal agNumber1,tyCardinal agNumber2)
Checks if the multiplication of two cardinals will not fail.
inline tyBoolean mulOk(tyInteger agNumber1,tyInteger agNumber2)
Checks if the multiplication of two integers will not fail.
inline tyBoolean subOk(tyCardinal agNumber1,tyCardinal agNumber2)
Checks if the subtraction of two cardinals will not fail.
inline tyBoolean subOk(tyInteger agNumber1,tyInteger agNumber2)
Checks if the subtraction of two integers will not fail.
inline tyInteger modSign(tyInteger agInteger)
Returns the sign of the modulo operator upon a given integer.
inline tyInteger sign(tyInteger agInteger)
Returns the sign of an integer.
inline tyBoolean exor(tyBoolean agExpression1,tyBoolean agExpression2)
Returns the result of the XOR operator upon two boolean expressions.
inline tyReal log10(tyReal agNumber)
Returns the natural logarithm of a number to the base 10.
inline tyReal log2(tyReal agNumber)
Returns the natural logarithm of a number to the base 2.
inline tyReal power10(tyReal agExponent)
Returns 10 raised to a given exponent.
inline tyReal power2(tyReal agExponent)
Returns 2 raised to a given exponent.
inline clString string(tyBoolean agBoolean)
Converts a boolean into a string.
inline clString string(tyCardinal agCardinal)
Converts a cardinal into a string.
inline clString string(tyByte agByte)
Converts a byte into a string.
inline clString string(tyCharacter agCharacter)
Converts a character into a string.
inline clString string(tyInteger agInteger)
Converts an integer into a string.
inline clString string(tyPointer agPointer)
Converts a pointer into a string.
inline clString string(tyReal agReal)
Converts a real into a string.
inline tyByte byte(tcString agString)
Converts a string into a byte.
inline tyCharacter character(tcString agString)
Converts a string into a character.
inline clString comparisonToString(tyComparison agComparison)
Converts an element comparison into a string.
function tyReal ceiling(tyReal agNumber)
Returns the minimum integer value superior or equal to a given real value according to the standard precision.
function tyCardinal bottomDiv(tyCardinal agDividend,tyCardinal agDivisor)
Returns the truncated division of two cardinals. The returned value is the cardinal just below or equal to the division.
function tyInteger bottomDiv(tyInteger agDividend,tyInteger agDivisor)
Returns the truncated division of two integers. The returned value is the integer just below or equal to the division.
function tyCardinal topDiv(tyCardinal agDividend,tyCardinal agDivisor)
Returns the truncated division of two cardinals. The returned value is the cardinal just above or equal to the division.
function tyInteger topDiv(tyInteger agDividend,tyInteger agDivisor)
Returns the truncated division of two integers. The returned value is the integer just above or equal to the division.
function tyCardinal percentage(tyCardinal agNumber,tyCardinal agPercentage)
Returns a given percentage of a cardinal value.
function tyInteger percentage(tyInteger agNumber,tyCardinal agPercentage)
Returns a given percentage of an integer value.
function tyBoolean boolean(tcString agString)
Converts a string into a boolean.
function tyCardinal cardinal(tcString agString)
Converts a string into a cardinal.
function tyComparison comparison(tcString agString)
Converts a string into an element comparison.
function tyInteger integer(tcString agString)
Converts a string into an integer.
function tyPointer pointer(tcString agString)
Converts a string into a pointer.
function tyReal real(tcString agString)
Converts a string into a real.