Ocean
Ocean::NumericT< T > Class Template Reference

This class provides basic numeric functionalities. More...

Public Member Functions

constexpr double eps ()
 Specialization of NumericT::eps(). More...
 
constexpr float eps ()
 Specialization of NumericT::eps(). More...
 
constexpr signed char eps ()
 Specialization of NumericT::eps(). More...
 
constexpr unsigned char eps ()
 Specialization of NumericT::eps(). More...
 
constexpr short eps ()
 Specialization of NumericT::eps(). More...
 
constexpr unsigned short eps ()
 Specialization of NumericT::eps(). More...
 
constexpr int eps ()
 Specialization of NumericT::eps(). More...
 
constexpr unsigned int eps ()
 Specialization of NumericT::eps(). More...
 
constexpr long eps ()
 Specialization of NumericT::eps(). More...
 
constexpr unsigned long eps ()
 Specialization of NumericT::eps(). More...
 
constexpr long long eps ()
 Specialization of NumericT::eps(). More...
 
constexpr unsigned long long eps ()
 Specialization of NumericT::eps(). More...
 
constexpr double weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr float weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr signed char weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr unsigned char weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr short weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr unsigned short weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr int weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr unsigned int weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr long weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr unsigned long weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr long long weakEps ()
 Specialization of NumericT::weakEps(). More...
 
constexpr unsigned long long weakEps ()
 Specialization of NumericT::weakEps(). More...
 
signed char abs (const signed char value)
 Specialization of NumericT::abs(). More...
 
unsigned char abs (const unsigned char value)
 Specialization of NumericT::abs(). More...
 
short abs (const short value)
 Specialization of NumericT::abs(). More...
 
unsigned short abs (const unsigned short value)
 Specialization of NumericT::abs(). More...
 
int abs (const int value)
 Specialization of NumericT::abs(). More...
 
unsigned int abs (const unsigned int value)
 Specialization of NumericT::abs(). More...
 
long abs (const long value)
 Specialization of NumericT::abs(). More...
 
unsigned long abs (const unsigned long value)
 Specialization of NumericT::abs(). More...
 
long long abs (const long long value)
 Specialization of NumericT::abs(). More...
 
unsigned long long abs (const unsigned long long value)
 Specialization of NumericT::abs(). More...
 
double abs (const double value)
 Specialization of NumericT::abs(). More...
 
float abs (const float value)
 Specialization of NumericT::abs(). More...
 
unsigned char secureAbs (const signed char value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned char secureAbs (const unsigned char value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned short secureAbs (const short value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned short secureAbs (const unsigned short value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned int secureAbs (const int value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned int secureAbs (const unsigned int value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned long secureAbs (const long value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned long secureAbs (const unsigned long value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned long long secureAbs (const long long value)
 Specialization of NumericT::secureAbs(). More...
 
unsigned long long secureAbs (const unsigned long long value)
 Specialization of NumericT::secureAbs(). More...
 
double secureAbs (const double value)
 Specialization of NumericT::secureAbs(). More...
 
float secureAbs (const float value)
 Specialization of NumericT::secureAbs(). More...
 
float sqrt (const float value)
 Specialization of NumericT::sqrt(). More...
 
int sqrt (const int value)
 Specialization of NumericT::sqrt(). More...
 
float sin (const float value)
 Specialization of NumericT::sin(). More...
 
float cos (const float value)
 Specialization of NumericT::cos(). More...
 
float tan (const float value)
 Specialization of NumericT::tan(). More...
 
float atan (const float value)
 Specialization of NumericT::atan(). More...
 
float exp (const float value)
 
float log (const float value)
 
float log1p (const float value)
 
float log2 (const float value)
 Specialization of NumericT::log2(). More...
 
float log10 (const float value)
 
float atan2 (const float y, const float x)
 Specialization of NumericT::atan2(). More...
 
float fmod (const float valueA, const float valueB)
 Specialization of NumericT::fmod(). More...
 
float pow (const float x, const float y)
 Specialization of NumericT::pow(). More...
 
constexpr unsigned int factorial (const unsigned int &value)
 
float ceil (const float value)
 Specialization of NumericT::ceil(). More...
 
double ceil (const double value)
 Specialization of NumericT::ceil(). More...
 
long double ceil (const long double value)
 Specialization of NumericT::ceil(). More...
 
float floor (const float value)
 Specialization of NumericT::floor(). More...
 
double floor (const double value)
 Specialization of NumericT::floor(). More...
 
long double floor (const long double value)
 Specialization of NumericT::floor(). More...
 
constexpr bool isEqualEps (const signed char value)
 
constexpr bool isEqualEps (const unsigned char value)
 
constexpr bool isEqualEps (const short value)
 
constexpr bool isEqualEps (const unsigned short value)
 
constexpr bool isEqualEps (const int value)
 
constexpr bool isEqualEps (const unsigned int value)
 
constexpr bool isEqualEps (const long value)
 
constexpr bool isEqualEps (const unsigned long value)
 
constexpr bool isEqualEps (const long long value)
 
constexpr bool isEqualEps (const unsigned long long value)
 
constexpr bool isWeakEqualEps (const signed char value)
 
constexpr bool isWeakEqualEps (const unsigned char value)
 
constexpr bool isWeakEqualEps (const short value)
 
constexpr bool isWeakEqualEps (const unsigned short value)
 
constexpr bool isWeakEqualEps (const int value)
 
constexpr bool isWeakEqualEps (const unsigned int value)
 
constexpr bool isWeakEqualEps (const long value)
 
constexpr bool isWeakEqualEps (const unsigned long value)
 
constexpr bool isWeakEqualEps (const long long value)
 
constexpr bool isWeakEqualEps (const unsigned long long value)
 
constexpr bool isNotEqualEps (const signed char value)
 
constexpr bool isNotEqualEps (const unsigned char value)
 
constexpr bool isNotEqualEps (const short value)
 
constexpr bool isNotEqualEps (const unsigned short value)
 
constexpr bool isNotEqualEps (const int value)
 
constexpr bool isNotEqualEps (const unsigned int value)
 
constexpr bool isNotEqualEps (const long value)
 
constexpr bool isNotEqualEps (const unsigned long value)
 
constexpr bool isNotEqualEps (const long long value)
 
constexpr bool isNotEqualEps (const unsigned long long value)
 
constexpr bool isNotWeakEqualEps (const signed char value)
 
constexpr bool isNotWeakEqualEps (const unsigned char value)
 
constexpr bool isNotWeakEqualEps (const short value)
 
constexpr bool isNotWeakEqualEps (const unsigned short value)
 
constexpr bool isNotWeakEqualEps (const int value)
 
constexpr bool isNotWeakEqualEps (const unsigned int value)
 
constexpr bool isNotWeakEqualEps (const long value)
 
constexpr bool isNotWeakEqualEps (const unsigned long value)
 
constexpr bool isNotWeakEqualEps (const long long value)
 
constexpr bool isNotWeakEqualEps (const unsigned long long value)
 
bool isEqual (const signed char first, const signed char second)
 
bool isEqual (const unsigned char first, const unsigned char second)
 
bool isEqual (const short first, const short second)
 
bool isEqual (const unsigned short first, const unsigned short second)
 
bool isEqual (const int first, const int second)
 
bool isEqual (const unsigned int first, const unsigned int second)
 
bool isEqual (const long first, const long second)
 
bool isEqual (const unsigned long first, const unsigned long second)
 
bool isEqual (const long long first, const long long second)
 
bool isEqual (const unsigned long long first, const unsigned long long second)
 
bool isEqual (const signed char first, const signed char second, const signed char epsilon)
 
bool isEqual (const short first, const short second, const short epsilon)
 
bool isEqual (const int first, const int second, const int epsilon)
 
bool isEqual (const long first, const long second, const long epsilon)
 
bool isEqual (const long long first, const long long second, const long long epsilon)
 
bool isEqual (const unsigned char first, const unsigned char second, const unsigned char epsilon)
 
bool isEqual (const unsigned short first, const unsigned short second, const unsigned short epsilon)
 
bool isEqual (const unsigned int first, const unsigned int second, const unsigned int epsilon)
 
bool isEqual (const unsigned long first, const unsigned long second, const unsigned long epsilon)
 
bool isEqual (const unsigned long long first, const unsigned long long second, const unsigned long long epsilon)
 
bool isWeakEqual (const int first, const int second)
 
bool isNotEqual (const signed char first, const signed char second)
 
bool isNotEqual (const unsigned char first, const unsigned char second)
 
bool isNotEqual (const short first, const short second)
 
bool isNotEqual (const unsigned short first, const unsigned short second)
 
bool isNotEqual (const int first, const int second)
 
bool isNotEqual (const unsigned int first, const unsigned int second)
 
bool isNotEqual (const long first, const long second)
 
bool isNotEqual (const unsigned long first, const unsigned long second)
 
bool isNotEqual (const long long first, const long long second)
 
bool isNotEqual (const unsigned long long first, const unsigned long long second)
 
bool isNotWeakEqual (const signed char first, const signed char second)
 
bool isNotWeakEqual (const unsigned char first, const unsigned char second)
 
bool isNotWeakEqual (const short first, const short second)
 
bool isNotWeakEqual (const unsigned short first, const unsigned short second)
 
bool isNotWeakEqual (const int first, const int second)
 
bool isNotWeakEqual (const unsigned int first, const unsigned int second)
 
bool isNotWeakEqual (const long first, const long second)
 
bool isNotWeakEqual (const unsigned long first, const unsigned long second)
 
bool isNotWeakEqual (const long long first, const long long second)
 
bool isNotWeakEqual (const unsigned long long first, const unsigned long long second)
 
bool isNotEqual (const signed char first, const signed char second, const signed char epsilon)
 
bool isNotEqual (const short first, const short second, const short epsilon)
 
bool isNotEqual (const int first, const int second, const int epsilon)
 
bool isNotEqual (const long first, const long second, const long epsilon)
 
bool isNotEqual (const long long first, const long long second, const long long epsilon)
 
bool isNotEqual (const unsigned char first, const unsigned char second, const unsigned char epsilon)
 
bool isNotEqual (const unsigned short first, const unsigned short second, const unsigned short epsilon)
 
bool isNotEqual (const unsigned int first, const unsigned int second, const unsigned int epsilon)
 
bool isNotEqual (const unsigned long first, const unsigned long second, const unsigned long epsilon)
 
bool isNotEqual (const unsigned long long first, const unsigned long long second, const unsigned long long epsilon)
 
float asin (const float value)
 Specialization of NumericT::asin(). More...
 
float acos (const float value)
 Specialization of NumericT::acos(). More...
 
bool isNan (const float value)
 
bool isNan (const double value)
 
bool isInf (const float value)
 
bool isInf (const double value)
 
bool isInf (const long double value)
 
constexpr double copySign (const double first, const double second)
 Specialization of NumericT::copySign(). More...
 
constexpr float copySign (const float first, const float second)
 Specialization of NumericT::copySign(). More...
 
constexpr double invertSign (const double first, const double second)
 Specialization of NumericT::invertSign(). More...
 
constexpr float invertSign (const float first, const float second)
 Specialization of NumericT::invertSign(). More...
 

Static Public Member Functions

static constexpr T pi ()
 Returns PI which is equivalent to 180 degree. More...
 
static constexpr T pi2 ()
 Returns 2*PI which is equivalent to 360 degree. More...
 
static constexpr T pi_2 ()
 Returns PI/2 which is equivalent to 90 degree. More...
 
static constexpr T pi_3 ()
 Returns PI/3 which is equivalent to 60 degree. More...
 
static constexpr T pi_4 ()
 Returns PI/4 which is equivalent to 45 degree. More...
 
static constexpr T squarePi ()
 Returns the square of PI i.e., PI^2. More...
 
static constexpr T squarePi2 ()
 Returns the square of two PI i.e., (2*PI)^2. More...
 
static constexpr T squarePi_2 ()
 Returns the square of PI half i.e., (PI/2)^2. More...
 
static constexpr T e ()
 Returns the euler's number. More...
 
static constexpr T eps ()
 Returns a small epsilon. More...
 
static constexpr T weakEps ()
 Returns a weak epsilon. More...
 
static T abs (const T value)
 Returns the absolute value of a given value. More...
 
static UnsignedTyper< T >::Type secureAbs (const T value)
 Returns the absolute value of a given value while the return value is guaranteed to be the absolute value of the input value. More...
 
static constexpr T sqr (const T value)
 Returns the square of a given value. More...
 
static T sum (const T *values, const size_t number)
 Returns the sum of given values. More...
 
static T summedSqr (const T *values, const size_t number)
 Returns the summed squares of a given values. More...
 
static constexpr T sqrDistance (const T value0, const T value1)
 Returns the square distance between two values. More...
 
static T sqrt (const T value)
 Returns the square root of a given value. More...
 
static std::complex< T > sqrt (const std::complex< T > &value)
 Returns the square root of a given value. More...
 
static T sin (const T value)
 Returns the sine of a given value. More...
 
static T cos (const T value)
 Returns the cosine of a given value. More...
 
static T tan (const T value)
 Returns the tangent of a given value. More...
 
static T asin (const T value)
 Returns the arcsine of a given value. More...
 
static T acos (const T value)
 Returns the arccosine of a given value. More...
 
static T atan (const T value)
 Returns the arctangent of a given value. More...
 
static T atan2 (const T y, const T x)
 Returns the arctangent of a given value in radian. More...
 
static T exp (const T value)
 Returns the base-e exponential function of a given value. More...
 
static T log (const T value)
 Returns the natural logarithm of a given value (the logarithm to the base e). More...
 
static T log1p (const T value)
 Returns the natural logarithm of a given value plus 1 (the logarithm to the base e). More...
 
static T log2 (const T value)
 Returns the logarithm to base 2 of a given value. More...
 
static T log10 (const T value)
 Returns the logarithm to base 10 of a given value. More...
 
static T fmod (const T valueA, const T valueB)
 Returns the floating-point remainder of a given value. More...
 
static T dot (const T *vectorA, const T *vectorB, const size_t size)
 Returns the dot product for two vectors. More...
 
static T angleAdjustPositive (const T angle)
 Adjusts an arbitrary angle into the range of [0.0, 2PI). More...
 
static T angleAdjustPositiveHalf (const T angle)
 Adjusts an arbitrary angle into the range of [0.0, PI). More...
 
static T angleAdjustNull (const T angle)
 Adjusts an arbitrary angle into the range of (-PI, PI]. More...
 
static bool angleIsEqual (const T angleA, const T angleB)
 Returns whether two angles represent the same angle up to a small epsilon. More...
 
static bool angleIsWeakEqual (const T angleA, const T angleB)
 Returns whether two angles represent the same angle up to a weak epsilon. More...
 
static bool angleIsEqual (const T angleA, const T angleB, const T epsilon)
 Returns whether two angles represent the same angle up to a given epsilon. More...
 
static bool angleIsBelowThreshold (const T angleA, const T angleB, const T threshold)
 Returns whether the angular difference (distance) between two angles is smaller than a specified threshold. More...
 
static T angleDistance (const T angleA, const T angleB)
 Returns the angular difference (distance between two angles). More...
 
static T pow (const T x, const T y)
 Returns x raised to the power of y. More...
 
static std::complex< T > pow (const std::complex< T > &x, const T y)
 Returns x raised to the power of y. More...
 
static constexpr T integerPow (const T x, const unsigned int y)
 Returns x raised to the power of y while y is an integer. More...
 
static constexpr T factorial (const T &value)
 Returns the factorial for a given value. More...
 
static constexpr T binomialCoefficient (const T &n, const T &k)
 Returns the binomial coefficient for two binomial parameters. More...
 
static T ceil (const T value)
 Returns the smallest integer value that is not less than the given value. More...
 
static T floor (const T value)
 Returns the largest integer value that is not greater than the given value. More...
 
static constexpr int32_t round32 (const T value)
 Returns the rounded 32 bit integer value of a given value. More...
 
static constexpr int64_t round64 (const T value)
 Returns the rounded 64 bit integer value of a given value. More...
 
static constexpr T ratio (const T nominator, const T denominator, const T fallback=T(1))
 Returns the ratio between two values if the denominator is not equal a small epsilon. More...
 
static constexpr bool isEqualEps (const T value)
 Returns whether a value is smaller than or equal to a small epsilon. More...
 
static constexpr bool isEqualEps (const std::complex< T > &value)
 Returns whether a complex value is smaller than or equal to a small epsilon. More...
 
static constexpr bool isWeakEqualEps (const T value)
 Returns whether a value is smaller than or equal to a weak epsilon. More...
 
static constexpr bool isWeakEqualEps (const std::complex< T > &value)
 Returns whether a complex value is smaller than or equal to a weak epsilon. More...
 
static constexpr bool isNotEqualEps (const T value)
 Returns whether a value is not smaller than or equal to a small epsilon. More...
 
static constexpr bool isNotEqualEps (const std::complex< T > &value)
 Returns whether a complex value is not smaller than or equal to a small epsilon. More...
 
static constexpr bool isNotWeakEqualEps (const T value)
 Returns whether a value is not smaller than or equal to a weak epsilon. More...
 
static constexpr bool isNotWeakEqualEps (const std::complex< T > &value)
 Returns whether a complex value is not smaller than or equal to a weak epsilon. More...
 
static bool isEqual (const T first, const T second)
 Returns whether two values are equal up to a small epsilon. More...
 
static bool isEqual (const std::complex< T > &first, const std::complex< T > &second)
 Returns whether two complex values are equal up to a small epsilon. More...
 
static bool isWeakEqual (const T first, const T second)
 Returns whether two values a equal up to a weak epsilon. More...
 
static bool isWeakEqual (const std::complex< T > &first, const std::complex< T > &second)
 Returns whether two complex values are equal up to a weak epsilon. More...
 
static bool isEqual (const T first, const T second, const T epsilon)
 Returns whether two values are equal up to a given epsilon. More...
 
static bool isEqual (const std::complex< T > &first, const std::complex< T > &second, const T epsilon)
 Returns whether two complex values are equal up to a given epsilon. More...
 
template<int tMagnitude>
static bool isEqual (const T first, const T second, const T referenceEpsilon)
 Returns whether two values are equal up to a dynamic epsilon which is adjusted due to the magnitude of both values and the reference magnitude. More...
 
static bool isNotEqual (const T first, const T second)
 Returns whether two values are not equal up to a small epsilon. More...
 
static bool isNotEqual (const std::complex< T > &first, const std::complex< T > &second)
 Returns whether two complex values are not equal up to a small epsilon. More...
 
static bool isNotWeakEqual (const T first, const T second)
 Returns whether two values are not equal up to a weak epsilon. More...
 
static bool isNotWeakEqual (const std::complex< T > &first, const std::complex< T > &second)
 Returns whether two complex values are not equal up to a weak epsilon. More...
 
static bool isNotEqual (const T first, const T second, const T epsilon)
 Returns whether two values are not equal up to a given epsilon. More...
 
static bool isNotEqual (const std::complex< T > &first, const std::complex< T > &second, const T epsilon)
 Returns whether two complex values are not equal up to a given epsilon. More...
 
static constexpr bool isInsideRange (const T lower, const T value, const T upper, const T epsilon=NumericT< T >::eps())
 Returns whether a value lies between a given range up to a provided epsilon border. More...
 
static constexpr bool isInsideWeakRange (const T lower, const T value, const T upper)
 Returns whether a value lies between a given range up to a weak epsilon border. More...
 
static constexpr bool isBelow (const T value, const T upper, const T epsilon=NumericT< T >::eps())
 Returns whether a parameter lies on or below a given border tolerating a small epsilon. More...
 
static constexpr bool isAbove (const T value, const T lower, const T epsilon=NumericT< T >::eps())
 Returns whether a parameter lies on or above a given border tolerating a small epsilon. More...
 
static constexpr T nan ()
 Returns a value which is not a number (nan). More...
 
static bool isNan (const T value)
 Returns whether a given value is not a number. More...
 
static bool isNan (const std::complex< T > &value)
 Returns whether a given value is not a number. More...
 
static constexpr T inf ()
 Returns a value which is positive infinity. More...
 
static bool isInf (const T value)
 Returns whether a given value is positive or negative infinity. More...
 
static bool isInf (const std::complex< T > &value)
 Returns whether a given value is positive or negative infinity. More...
 
template<typename TValue >
static bool isInsideValueRange (const TValue &value)
 Returns whether a given value of an arbitrary data type fits into the value range of 'T'. More...
 
static constexpr T deg2rad (const T deg)
 Converts deg to rad. More...
 
static constexpr T rad2deg (const T rad)
 Converts rad to deg. More...
 
static constexpr T maxValue ()
 Returns the max scalar value. More...
 
static constexpr T minValue ()
 Returns the min scalar value. More...
 
static constexpr T sign (const T &value)
 Returns the sign of a given value by either returning -1, 0, or +1. More...
 
static constexpr T copySign (const T signReceiver, const T signProvider)
 Copies the sign of a given value to another one. More...
 
static constexpr T invertSign (const T signReceiver, const T signProvider)
 Copies the inverted sign of a given value to another one. More...
 
static T pythagoras (const T a, const T b)
 Returns the length of the hypotenuse of a given right-angled triangle. More...
 
static T gaussianDistribution (const T x, const T sigma)
 Returns a value of the univariate Gaussian distribution centered around the origin. More...
 
static T gaussianDistribution (const T x, const T x0, const T sigma)
 Returns a value of the univariate Gaussian distribution centered around a given position x0. More...
 
static T normalizedGaussianDistribution (const T x, const T sigma)
 Returns a value of the normalized univariate Gaussian distribution centered around the origin. More...
 
static T normalizedGaussianDistribution (const T x, const T x0, const T sigma)
 Returns a value of the normalized univariate Gaussian distribution around a given position x0. More...
 
static T gaussianDistribution2 (const T x, const T y, const T sigmaX, const T sigmaY)
 Returns a value of the bivariate Gaussian distribution centered around the origin. More...
 
static T gaussianDistribution2 (const T x, const T y, const T x0, const T y0, const T sigmaX, const T sigmaY)
 Returns a value of the bivariate Gaussian distribution centered around a given position (x0, y0). More...
 
static T normalizedGaussianDistribution2 (const T x, const T y, const T sigmaX, const T sigmaY)
 Returns a value of the normalized bivariate Gaussian distribution centered around the origin. More...
 
static T normalizedGaussianDistribution2 (const T x, const T y, const T x0, const T y0, const T sigmaX, const T sigmaY)
 Returns a value of the normalized bivariate Gaussian distribution centered around a given position (x0, y0). More...
 
static T gaussianDistribution3 (const T x, const T y, const T z, const T sigmaX, const T sigmaY, const T sigmaZ)
 Returns a value of the trivariate Gaussian distribution centered around the origin. More...
 
static T gaussianDistribution3 (const T x, const T y, const T z, const T x0, const T y0, const T z0, const T sigmaX, const T sigmaY, const T sigmaZ)
 Returns a value of the trivariate Gaussian distribution centered around a given position (x0, y0, z0). More...
 
static T normalizedGaussianDistribution3 (const T x, const T y, const T z, const T sigmaX, const T sigmaY, const T sigmaZ)
 Returns a value of the normalized trivariate Gaussian distribution centered around the origin. More...
 
static T normalizedGaussianDistribution3 (const T x, const T y, const T z, const T x0, const T y0, const T z0, const T sigmaX, const T sigmaY, const T sigmaZ)
 Returns a value of the normalized trivariate Gaussian distribution centered around a given position (x0, y0, z0). More...
 

Detailed Description

template<typename T>
class Ocean::NumericT< T >

This class provides basic numeric functionalities.

Template Parameters
TData type of the numeric elements
See also
Numeric, NumericF, NumericD.

Member Function Documentation

◆ abs() [1/13]

double Ocean::NumericT< double >::abs ( const double  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [2/13]

float Ocean::NumericT< float >::abs ( const float  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [3/13]

int Ocean::NumericT< int >::abs ( const int  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [4/13]

long long Ocean::NumericT< long long >::abs ( const long long  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [5/13]

long Ocean::NumericT< long >::abs ( const long  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [6/13]

short Ocean::NumericT< short >::abs ( const short  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [7/13]

signed char Ocean::NumericT< signed char >::abs ( const signed char  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [8/13]

template<typename T >
T Ocean::NumericT< T >::abs ( const T  value)
inlinestatic

Returns the absolute value of a given value.

Beware some values do not have a corresponding absolute value e.g., -128 for (8bit signed chars), -32768 for (16bit signed chars), and so on.

Parameters
valueThe value for which the absolute value will be returned
Returns
Absolute value
See also
secureAbs().

◆ abs() [9/13]

unsigned char Ocean::NumericT< unsigned char >::abs ( const unsigned char  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [10/13]

unsigned int Ocean::NumericT< unsigned int >::abs ( const unsigned int  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [11/13]

unsigned long long Ocean::NumericT< unsigned long long >::abs ( const unsigned long long  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [12/13]

unsigned long Ocean::NumericT< unsigned long >::abs ( const unsigned long  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ abs() [13/13]

unsigned short Ocean::NumericT< unsigned short >::abs ( const unsigned short  value)
inline

Specialization of NumericT::abs().

See also
NumericT::abs().

◆ acos() [1/2]

float Ocean::NumericT< float >::acos ( const float  value)
inline

Specialization of NumericT::acos().

See also
NumericT::acos().

◆ acos() [2/2]

template<typename T >
T Ocean::NumericT< T >::acos ( const T  value)
inlinestatic

Returns the arccosine of a given value.

Parameters
valueThe value to return the arc cosine from, with range [-1, 1]
Returns
Arccosine value in radian, with range [0, PI]

◆ angleAdjustNull()

template<typename T >
T Ocean::NumericT< T >::angleAdjustNull ( const T  angle)
inlinestatic

Adjusts an arbitrary angle into the range of (-PI, PI].

Parameters
angleThe angle to be adjusted, defined in radian, with range (-infinity, infinity)
Returns
Adjusted angle with range (-PI, PI]

◆ angleAdjustPositive()

template<typename T >
T Ocean::NumericT< T >::angleAdjustPositive ( const T  angle)
inlinestatic

Adjusts an arbitrary angle into the range of [0.0, 2PI).

Parameters
angleThe angle to be adjusted, defined in radian, with range (-infinity, infinity)
Returns
Adjusted angle with range [0.0, 2PI)

◆ angleAdjustPositiveHalf()

template<typename T >
T Ocean::NumericT< T >::angleAdjustPositiveHalf ( const T  angle)
inlinestatic

Adjusts an arbitrary angle into the range of [0.0, PI).

Parameters
angleThe angle to be adjusted, defined in radian, with range (-infinity, infinity)
Returns
Adjusted angle with range [0.0, PI)

◆ angleDistance()

template<typename T >
T Ocean::NumericT< T >::angleDistance ( const T  angleA,
const T  angleB 
)
inlinestatic

Returns the angular difference (distance between two angles).

Parameters
angleAFirst angle specified in radian, with range (-infinity, infinity)
angleBSecond angle specified in radian, with range (-infinity, infinity)
Returns
Absolute distance between both angles, in radian

◆ angleIsBelowThreshold()

template<typename T >
bool Ocean::NumericT< T >::angleIsBelowThreshold ( const T  angleA,
const T  angleB,
const T  threshold 
)
inlinestatic

Returns whether the angular difference (distance) between two angles is smaller than a specified threshold.

Parameters
angleAFirst angle specified in radian, with range (-infinity, infinity)
angleBSecond angle specified in radian, with range (-infinity, infinity)
thresholdPositive angular threshold in radian with range [0, PI)
Returns
True, if so

◆ angleIsEqual() [1/2]

template<typename T >
bool Ocean::NumericT< T >::angleIsEqual ( const T  angleA,
const T  angleB 
)
inlinestatic

Returns whether two angles represent the same angle up to a small epsilon.

Parameters
angleAFirst angle specified in radian, with range (-infinity, infinity)
angleBSecond angle specified in radian, with range (-infinity, infinity)
Returns
True, if so

◆ angleIsEqual() [2/2]

template<typename T >
bool Ocean::NumericT< T >::angleIsEqual ( const T  angleA,
const T  angleB,
const T  epsilon 
)
inlinestatic

Returns whether two angles represent the same angle up to a given epsilon.

Parameters
angleAFirst angle specified in radian, with range (-infinity, infinity)
angleBSecond angle specified in radian, with range (-infinity, infinity)
epsilonAccuracy epsilon in radian, with range [0, infinity)
Returns
True, if so

◆ angleIsWeakEqual()

template<typename T >
bool Ocean::NumericT< T >::angleIsWeakEqual ( const T  angleA,
const T  angleB 
)
inlinestatic

Returns whether two angles represent the same angle up to a weak epsilon.

Parameters
angleAFirst angle specified in radian, with range (-infinity, infinity)
angleBSecond angle specified in radian, with range (-infinity, infinity)
Returns
True, if so

◆ asin() [1/2]

float Ocean::NumericT< float >::asin ( const float  value)
inline

Specialization of NumericT::asin().

See also
NumericT::asin().

◆ asin() [2/2]

template<typename T >
T Ocean::NumericT< T >::asin ( const T  value)
inlinestatic

Returns the arcsine of a given value.

Parameters
valueThe value to return the arc sine from, with range [-1, 1]
Returns
Arcsine value, with range [-PI/2, PI/2]

◆ atan() [1/2]

float Ocean::NumericT< float >::atan ( const float  value)
inline

Specialization of NumericT::atan().

See also
NumericT::atan().

◆ atan() [2/2]

template<typename T >
T Ocean::NumericT< T >::atan ( const T  value)
inlinestatic

Returns the arctangent of a given value.

Parameters
valueThe value to return the arctangent from
Returns
Arctangent value, with range [-PI/2, PI/2]

◆ atan2() [1/2]

float Ocean::NumericT< float >::atan2 ( const float  y,
const float  x 
)
inline

Specialization of NumericT::atan2().

See also
NumericT::atan2().

◆ atan2() [2/2]

template<typename T >
T Ocean::NumericT< T >::atan2 ( const T  y,
const T  x 
)
inlinestatic

Returns the arctangent of a given value in radian.

Parameters
yOpposite value, must not be zero if x is zero
xAdjacent value, must not be zero if y is zero
Returns
Arctangent value, with range [-PI, PI]

◆ binomialCoefficient()

template<typename T >
constexpr T Ocean::NumericT< T >::binomialCoefficient ( const T &  n,
const T &  k 
)
inlinestaticconstexpr

Returns the binomial coefficient for two binomial parameters.

This function calculates: n! / (k! * (n - k)!).

Parameters
nUpper binomial coefficient parameter, with range [0, infinity)
kLower binomial coefficient parameter, with range [0, n]
Returns
Resulting binomial coefficient

◆ ceil() [1/4]

double Ocean::NumericT< double >::ceil ( const double  value)
inline

Specialization of NumericT::ceil().

See also
NumericT::ceil().

◆ ceil() [2/4]

float Ocean::NumericT< float >::ceil ( const float  value)
inline

Specialization of NumericT::ceil().

See also
NumericT::ceil().

◆ ceil() [3/4]

long double Ocean::NumericT< long double >::ceil ( const long double  value)
inline

Specialization of NumericT::ceil().

See also
NumericT::ceil().

◆ ceil() [4/4]

template<typename T >
T Ocean::NumericT< T >::ceil ( const T  value)
inlinestatic

Returns the smallest integer value that is not less than the given value.

Parameters
valueThe value to handle, with range (-infinity, infinity)
Returns
Smallest integer value

◆ copySign() [1/3]

constexpr double Ocean::NumericT< double >::copySign ( const double  first,
const double  second 
)
inlineconstexpr

Specialization of NumericT::copySign().

See also
NumericT::copySign().

◆ copySign() [2/3]

constexpr float Ocean::NumericT< float >::copySign ( const float  first,
const float  second 
)
inlineconstexpr

Specialization of NumericT::copySign().

See also
NumericT::copySign().

◆ copySign() [3/3]

template<typename T >
constexpr T Ocean::NumericT< T >::copySign ( const T  signReceiver,
const T  signProvider 
)
inlinestaticconstexpr

Copies the sign of a given value to another one.

Parameters
signReceiverFirst value receiving the sign from the second value
signProviderSecond value providing the sign for the first one
Returns
First value with the sign of the second one

◆ cos() [1/2]

float Ocean::NumericT< float >::cos ( const float  value)
inline

Specialization of NumericT::cos().

See also
NumericT::cos().

◆ cos() [2/2]

template<typename T >
T Ocean::NumericT< T >::cos ( const T  value)
inlinestatic

Returns the cosine of a given value.

Parameters
valueThe value to return the cosine from, with range (-infinity, infinity)
Returns
Cosine value

◆ deg2rad()

template<typename T >
constexpr T Ocean::NumericT< T >::deg2rad ( const T  deg)
inlinestaticconstexpr

Converts deg to rad.

Parameters
degAngle in deg, with range (-infinity, infinity)
Returns
Angle in radian

◆ dot()

template<typename T >
T Ocean::NumericT< T >::dot ( const T *  vectorA,
const T *  vectorB,
const size_t  size 
)
inlinestatic

Returns the dot product for two vectors.

Parameters
vectorAThe first vector, can be nullptr if size is 0
vectorBThe second vector, can be nullptr if size is 0
sizeThe size/dimension of both vector (the number of elements each vector holds), with range [0, infinity)
Returns
The resulting dot product

◆ e()

template<typename T >
constexpr T Ocean::NumericT< T >::e
staticconstexpr

Returns the euler's number.

Returns
Euler's number

◆ eps() [1/13]

template<typename T >
static constexpr T Ocean::NumericT< T >::eps ( )
staticconstexpr

Returns a small epsilon.

Returns
Small epsilon

◆ eps() [2/13]

constexpr double Ocean::NumericT< double >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [3/13]

constexpr float Ocean::NumericT< float >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [4/13]

constexpr signed char Ocean::NumericT< signed char >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [5/13]

constexpr unsigned char Ocean::NumericT< unsigned char >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [6/13]

constexpr short Ocean::NumericT< short >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [7/13]

constexpr unsigned short Ocean::NumericT< unsigned short >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [8/13]

constexpr int Ocean::NumericT< int >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [9/13]

constexpr unsigned int Ocean::NumericT< unsigned int >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [10/13]

constexpr long Ocean::NumericT< long >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [11/13]

constexpr unsigned long Ocean::NumericT< unsigned long >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [12/13]

constexpr long long Ocean::NumericT< long long >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ eps() [13/13]

constexpr unsigned long long Ocean::NumericT< unsigned long long >::eps ( )
constexpr

Specialization of NumericT::eps().

See also
NumericT::eps().

◆ exp() [1/2]

float Ocean::NumericT< float >::exp ( const float  value)
inline

◆ exp() [2/2]

template<typename T >
T Ocean::NumericT< T >::exp ( const T  value)
inlinestatic

Returns the base-e exponential function of a given value.

Parameters
valueThe value to determine the exponential value for, with range (-infinity, infinity)
Returns
Exponential value

◆ factorial() [1/2]

template<typename T >
constexpr T Ocean::NumericT< T >::factorial ( const T &  value)
inlinestaticconstexpr

Returns the factorial for a given value.

Parameters
valueThe value for that the factorial will be determined, with range [0, infinity) for floating point types; with range [0, 12] for 32 bit integer types
Returns
Resulting factorial, with range [0, infinity)

◆ factorial() [2/2]

constexpr unsigned int Ocean::NumericT< unsigned int >::factorial ( const unsigned int &  value)
inlineconstexpr

◆ floor() [1/4]

double Ocean::NumericT< double >::floor ( const double  value)
inline

Specialization of NumericT::floor().

See also
NumericT::floor().

◆ floor() [2/4]

float Ocean::NumericT< float >::floor ( const float  value)
inline

Specialization of NumericT::floor().

See also
NumericT::floor().

◆ floor() [3/4]

long double Ocean::NumericT< long double >::floor ( const long double  value)
inline

Specialization of NumericT::floor().

See also
NumericT::floor().

◆ floor() [4/4]

template<typename T >
T Ocean::NumericT< T >::floor ( const T  value)
inlinestatic

Returns the largest integer value that is not greater than the given value.

Parameters
valueThe value to handle, with range (-infinity, infinity)
Returns
Largest integer value

◆ fmod() [1/2]

float Ocean::NumericT< float >::fmod ( const float  valueA,
const float  valueB 
)
inline

Specialization of NumericT::fmod().

See also
NumericT::fmod().

◆ fmod() [2/2]

template<typename T >
T Ocean::NumericT< T >::fmod ( const T  valueA,
const T  valueB 
)
inlinestatic

Returns the floating-point remainder of a given value.

Parameters
valueAValue to return the floating-point remainder from
valueBDivisor value
Returns
Floating-point remainder

◆ gaussianDistribution() [1/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution ( const T  x,
const T  sigma 
)
inlinestatic

Returns a value of the univariate Gaussian distribution centered around the origin.

Parameters
xValue to return the Gaussian distribution value for
sigmaThe sigma parameter defining the standard deviation of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ gaussianDistribution() [2/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution ( const T  x,
const T  x0,
const T  sigma 
)
inlinestatic

Returns a value of the univariate Gaussian distribution centered around a given position x0.

Parameters
xValue to return the Gaussian distribution value for
x0X value for the center of the Gaussian distribution
sigmaThe sigma parameter defining the standard deviation of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ gaussianDistribution2() [1/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution2 ( const T  x,
const T  y,
const T  sigmaX,
const T  sigmaY 
)
inlinestatic

Returns a value of the bivariate Gaussian distribution centered around the origin.

Parameters
xX value for the function
yY value for the function
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ gaussianDistribution2() [2/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution2 ( const T  x,
const T  y,
const T  x0,
const T  y0,
const T  sigmaX,
const T  sigmaY 
)
inlinestatic

Returns a value of the bivariate Gaussian distribution centered around a given position (x0, y0).

Parameters
xX value for the function
yY value for the function
x0X value for the center of the Gaussian distribution
y0Y value for the center of the Gaussian distribution
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ gaussianDistribution3() [1/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution3 ( const T  x,
const T  y,
const T  z,
const T  sigmaX,
const T  sigmaY,
const T  sigmaZ 
)
inlinestatic

Returns a value of the trivariate Gaussian distribution centered around the origin.

Parameters
xX value for the function
yY value for the function
zZ value for the function
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
sigmaZSigma parameter defining the standard deviation for the z-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ gaussianDistribution3() [2/2]

template<typename T >
T Ocean::NumericT< T >::gaussianDistribution3 ( const T  x,
const T  y,
const T  z,
const T  x0,
const T  y0,
const T  z0,
const T  sigmaX,
const T  sigmaY,
const T  sigmaZ 
)
inlinestatic

Returns a value of the trivariate Gaussian distribution centered around a given position (x0, y0, z0).

Parameters
xX value for the function
yY value for the function
zZ value for the function
x0X value for the center of the Gaussian distribution
y0Y value for the center of the Gaussian distribution
z0Z value for the center of the Gaussian distribution
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
sigmaZSigma parameter defining the standard deviation for the z-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ inf()

template<typename T >
constexpr T Ocean::NumericT< T >::inf
inlinestaticconstexpr

Returns a value which is positive infinity.

Returns
Positive infinity

◆ integerPow()

template<typename T >
constexpr T Ocean::NumericT< T >::integerPow ( const T  x,
const unsigned int  y 
)
staticconstexpr

Returns x raised to the power of y while y is an integer.

Parameters
xX value, with range [0, infinity)
yY value, with range (-infinity, infinity)
Returns
The power result

◆ invertSign() [1/3]

constexpr double Ocean::NumericT< double >::invertSign ( const double  first,
const double  second 
)
inlineconstexpr

Specialization of NumericT::invertSign().

See also
NumericT::invertedSign().

◆ invertSign() [2/3]

constexpr float Ocean::NumericT< float >::invertSign ( const float  first,
const float  second 
)
inlineconstexpr

Specialization of NumericT::invertSign().

See also
NumericT::invertSign().

◆ invertSign() [3/3]

template<typename T >
constexpr T Ocean::NumericT< T >::invertSign ( const T  signReceiver,
const T  signProvider 
)
inlinestaticconstexpr

Copies the inverted sign of a given value to another one.

Parameters
signReceiverFirst value receiving the inverted sign from the second value
signProviderSecond value providing the inverted sign for the first one
Returns
First value with the inverted sign of the second one

◆ isAbove()

template<typename T >
constexpr bool Ocean::NumericT< T >::isAbove ( const T  value,
const T  lower,
const T  epsilon = NumericT<T>::eps() 
)
staticconstexpr

Returns whether a parameter lies on or above a given border tolerating a small epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
lowerThe lower border, with range (-infinity, infinity)
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if 'lower - epsilon <= value'

◆ isBelow()

template<typename T >
constexpr bool Ocean::NumericT< T >::isBelow ( const T  value,
const T  upper,
const T  epsilon = NumericT<T>::eps() 
)
staticconstexpr

Returns whether a parameter lies on or below a given border tolerating a small epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
upperThe upper border, with range (-infinity, infinity)
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if 'value <= upper + epsilon'

◆ isEqual() [1/25]

bool Ocean::NumericT< int >::isEqual ( const int  first,
const int  second 
)
inline

◆ isEqual() [2/25]

bool Ocean::NumericT< int >::isEqual ( const int  first,
const int  second,
const int  epsilon 
)
inline

◆ isEqual() [3/25]

bool Ocean::NumericT< long >::isEqual ( const long  first,
const long  second 
)
inline

◆ isEqual() [4/25]

bool Ocean::NumericT< long >::isEqual ( const long  first,
const long  second,
const long  epsilon 
)
inline

◆ isEqual() [5/25]

bool Ocean::NumericT< long long >::isEqual ( const long long  first,
const long long  second 
)
inline

◆ isEqual() [6/25]

bool Ocean::NumericT< long long >::isEqual ( const long long  first,
const long long  second,
const long long  epsilon 
)
inline

◆ isEqual() [7/25]

bool Ocean::NumericT< short >::isEqual ( const short  first,
const short  second 
)
inline

◆ isEqual() [8/25]

bool Ocean::NumericT< short >::isEqual ( const short  first,
const short  second,
const short  epsilon 
)
inline

◆ isEqual() [9/25]

bool Ocean::NumericT< signed char >::isEqual ( const signed char  first,
const signed char  second 
)
inline

◆ isEqual() [10/25]

bool Ocean::NumericT< signed char >::isEqual ( const signed char  first,
const signed char  second,
const signed char  epsilon 
)
inline

◆ isEqual() [11/25]

template<typename T >
bool Ocean::NumericT< T >::isEqual ( const std::complex< T > &  first,
const std::complex< T > &  second 
)
inlinestatic

Returns whether two complex values are equal up to a small epsilon.

Parameters
firstThe first value to check
secondThe second value to check
Returns
True, if so

◆ isEqual() [12/25]

template<typename T >
bool Ocean::NumericT< T >::isEqual ( const std::complex< T > &  first,
const std::complex< T > &  second,
const T  epsilon 
)
inlinestatic

Returns whether two complex values are equal up to a given epsilon.

Parameters
firstThe first value to check
secondThe second value to check
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if so

◆ isEqual() [13/25]

template<typename T >
bool Ocean::NumericT< T >::isEqual ( const T  first,
const T  second 
)
inlinestatic

Returns whether two values are equal up to a small epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isEqual() [14/25]

template<typename T >
bool Ocean::NumericT< T >::isEqual ( const T  first,
const T  second,
const T  epsilon 
)
inlinestatic

Returns whether two values are equal up to a given epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if so

◆ isEqual() [15/25]

template<typename T >
template<int tMagnitude>
static bool Ocean::NumericT< T >::isEqual ( const T  first,
const T  second,
const T  referenceEpsilon 
)
inlinestatic

Returns whether two values are equal up to a dynamic epsilon which is adjusted due to the magnitude of both values and the reference magnitude.

The reference magnitude (provided as template parameter) corresponds to the provided reference epsilon.
That means that if the magnitude of both values to compare is equal to the defined reference magnitude the given epsilon value is used for comparison.
Otherwise the given epsilon is increased by 10 times the difference between the magnitude of the values and the reference magnitude, the epsilon value will not be decreased if the actual magnitude is smaller than the reference magnitude.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
referenceEpsilonThe accuracy epsilon for the specified magnitude, with range [0, infinity)
Returns
True, if so
Template Parameters
tMagnitudeThe reference magnitude for which the specified epsilon must hold so that both values count as equal, with range [-20, 20]

◆ isEqual() [16/25]

bool Ocean::NumericT< unsigned char >::isEqual ( const unsigned char  first,
const unsigned char  second 
)
inline

◆ isEqual() [17/25]

bool Ocean::NumericT< unsigned char >::isEqual ( const unsigned char  first,
const unsigned char  second,
const unsigned char  epsilon 
)
inline

◆ isEqual() [18/25]

bool Ocean::NumericT< unsigned int >::isEqual ( const unsigned int  first,
const unsigned int  second 
)
inline

◆ isEqual() [19/25]

bool Ocean::NumericT< unsigned int >::isEqual ( const unsigned int  first,
const unsigned int  second,
const unsigned int  epsilon 
)
inline

◆ isEqual() [20/25]

bool Ocean::NumericT< unsigned long >::isEqual ( const unsigned long  first,
const unsigned long  second 
)
inline

◆ isEqual() [21/25]

bool Ocean::NumericT< unsigned long >::isEqual ( const unsigned long  first,
const unsigned long  second,
const unsigned long  epsilon 
)
inline

◆ isEqual() [22/25]

bool Ocean::NumericT< unsigned long long >::isEqual ( const unsigned long long  first,
const unsigned long long  second 
)
inline

◆ isEqual() [23/25]

bool Ocean::NumericT< unsigned long long >::isEqual ( const unsigned long long  first,
const unsigned long long  second,
const unsigned long long  epsilon 
)
inline

◆ isEqual() [24/25]

bool Ocean::NumericT< unsigned short >::isEqual ( const unsigned short  first,
const unsigned short  second 
)
inline

◆ isEqual() [25/25]

bool Ocean::NumericT< unsigned short >::isEqual ( const unsigned short  first,
const unsigned short  second,
const unsigned short  epsilon 
)
inline

◆ isEqualEps() [1/12]

constexpr bool Ocean::NumericT< int >::isEqualEps ( const int  value)
inlineconstexpr

◆ isEqualEps() [2/12]

constexpr bool Ocean::NumericT< long long >::isEqualEps ( const long long  value)
inlineconstexpr

◆ isEqualEps() [3/12]

constexpr bool Ocean::NumericT< long >::isEqualEps ( const long  value)
inlineconstexpr

◆ isEqualEps() [4/12]

constexpr bool Ocean::NumericT< short >::isEqualEps ( const short  value)
inlineconstexpr

◆ isEqualEps() [5/12]

constexpr bool Ocean::NumericT< signed char >::isEqualEps ( const signed char  value)
inlineconstexpr

◆ isEqualEps() [6/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isEqualEps ( const std::complex< T > &  value)
inlinestaticconstexpr

Returns whether a complex value is smaller than or equal to a small epsilon.

Parameters
valueComplex value to check
Returns
True, if so

◆ isEqualEps() [7/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isEqualEps ( const T  value)
inlinestaticconstexpr

Returns whether a value is smaller than or equal to a small epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isEqualEps() [8/12]

constexpr bool Ocean::NumericT< unsigned char >::isEqualEps ( const unsigned char  value)
inlineconstexpr

◆ isEqualEps() [9/12]

constexpr bool Ocean::NumericT< unsigned int >::isEqualEps ( const unsigned int  value)
inlineconstexpr

◆ isEqualEps() [10/12]

constexpr bool Ocean::NumericT< unsigned long long >::isEqualEps ( const unsigned long long  value)
inlineconstexpr

◆ isEqualEps() [11/12]

constexpr bool Ocean::NumericT< unsigned long >::isEqualEps ( const unsigned long  value)
inlineconstexpr

◆ isEqualEps() [12/12]

constexpr bool Ocean::NumericT< unsigned short >::isEqualEps ( const unsigned short  value)
inlineconstexpr

◆ isInf() [1/5]

bool Ocean::NumericT< double >::isInf ( const double  value)
inline

◆ isInf() [2/5]

bool Ocean::NumericT< float >::isInf ( const float  value)
inline

◆ isInf() [3/5]

bool Ocean::NumericT< long double >::isInf ( const long double  value)
inline

◆ isInf() [4/5]

template<typename T >
bool Ocean::NumericT< T >::isInf ( const std::complex< T > &  value)
inlinestatic

Returns whether a given value is positive or negative infinity.

Only floating point values can be infinity.

Parameters
valueThe value to check
Returns
True, if so

◆ isInf() [5/5]

template<typename T >
bool Ocean::NumericT< T >::isInf ( const T  value)
inlinestatic

Returns whether a given value is positive or negative infinity.

Only floating point values can be infinity.

Parameters
valueThe value to check
Returns
True, if so

◆ isInsideRange()

template<typename T >
constexpr bool Ocean::NumericT< T >::isInsideRange ( const T  lower,
const T  value,
const T  upper,
const T  epsilon = NumericT<T>::eps() 
)
staticconstexpr

Returns whether a value lies between a given range up to a provided epsilon border.

Parameters
lowerThe lower border, with range (-infinity, infinity)
valueThe value to check, with range (-infinity, infinity)
upperThe upper border, with range [lower, infinity)
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if so

◆ isInsideValueRange()

template<typename T >
template<typename TValue >
bool Ocean::NumericT< T >::isInsideValueRange ( const TValue &  value)
inlinestatic

Returns whether a given value of an arbitrary data type fits into the value range of 'T'.

Below the behavior for individual data types:

T           TValue           return
A           A                true
float       float            true
double      double           true
uint8_t     int8_t           >= 0
int8_t      uint8_t          <= 127
uint8_t     uint16_t         true
uint8_t     uint32_t         true
...
float       Integral         false
double      Integral         false
Integral    float            false
Integral    double           false
Parameters
valueThe value to check, with range (-infinity, infinity)
Returns
True, if value fits into 'T', or 'T' is same as 'TValue'
Template Parameters
TValueThe data type of the given value

◆ isInsideWeakRange()

template<typename T >
constexpr bool Ocean::NumericT< T >::isInsideWeakRange ( const T  lower,
const T  value,
const T  upper 
)
staticconstexpr

Returns whether a value lies between a given range up to a weak epsilon border.

Parameters
lowerThe lower border, with range (-infinity, infinity)
valueThe value to check, with range (-infinity, infinity)
upperThe upper border, with range [lower, infinity)
Returns
True, if so

◆ isNan() [1/4]

bool Ocean::NumericT< double >::isNan ( const double  value)
inline

◆ isNan() [2/4]

bool Ocean::NumericT< float >::isNan ( const float  value)
inline

◆ isNan() [3/4]

template<typename T >
bool Ocean::NumericT< T >::isNan ( const std::complex< T > &  value)
inlinestatic

Returns whether a given value is not a number.

Parameters
valueThe value to check
Returns
True, if so

◆ isNan() [4/4]

template<typename T >
bool Ocean::NumericT< T >::isNan ( const T  value)
inlinestatic

Returns whether a given value is not a number.

Parameters
valueThe value to check
Returns
True, if so

◆ isNotEqual() [1/24]

bool Ocean::NumericT< int >::isNotEqual ( const int  first,
const int  second 
)
inline

◆ isNotEqual() [2/24]

bool Ocean::NumericT< int >::isNotEqual ( const int  first,
const int  second,
const int  epsilon 
)
inline

◆ isNotEqual() [3/24]

bool Ocean::NumericT< long >::isNotEqual ( const long  first,
const long  second 
)
inline

◆ isNotEqual() [4/24]

bool Ocean::NumericT< long >::isNotEqual ( const long  first,
const long  second,
const long  epsilon 
)
inline

◆ isNotEqual() [5/24]

bool Ocean::NumericT< long long >::isNotEqual ( const long long  first,
const long long  second 
)
inline

◆ isNotEqual() [6/24]

bool Ocean::NumericT< long long >::isNotEqual ( const long long  first,
const long long  second,
const long long  epsilon 
)
inline

◆ isNotEqual() [7/24]

bool Ocean::NumericT< short >::isNotEqual ( const short  first,
const short  second 
)
inline

◆ isNotEqual() [8/24]

bool Ocean::NumericT< short >::isNotEqual ( const short  first,
const short  second,
const short  epsilon 
)
inline

◆ isNotEqual() [9/24]

bool Ocean::NumericT< signed char >::isNotEqual ( const signed char  first,
const signed char  second 
)
inline

◆ isNotEqual() [10/24]

bool Ocean::NumericT< signed char >::isNotEqual ( const signed char  first,
const signed char  second,
const signed char  epsilon 
)
inline

◆ isNotEqual() [11/24]

template<typename T >
bool Ocean::NumericT< T >::isNotEqual ( const std::complex< T > &  first,
const std::complex< T > &  second 
)
inlinestatic

Returns whether two complex values are not equal up to a small epsilon.

Parameters
firstThe first value to check
secondThe second value to check
Returns
True, if so

◆ isNotEqual() [12/24]

template<typename T >
bool Ocean::NumericT< T >::isNotEqual ( const std::complex< T > &  first,
const std::complex< T > &  second,
const T  epsilon 
)
inlinestatic

Returns whether two complex values are not equal up to a given epsilon.

Parameters
firstThe first value to check
secondThe second value to check
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if so

◆ isNotEqual() [13/24]

template<typename T >
bool Ocean::NumericT< T >::isNotEqual ( const T  first,
const T  second 
)
inlinestatic

Returns whether two values are not equal up to a small epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isNotEqual() [14/24]

template<typename T >
bool Ocean::NumericT< T >::isNotEqual ( const T  first,
const T  second,
const T  epsilon 
)
inlinestatic

Returns whether two values are not equal up to a given epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
epsilonAccuracy epsilon, with range [0, infinity)
Returns
True, if so

◆ isNotEqual() [15/24]

bool Ocean::NumericT< unsigned char >::isNotEqual ( const unsigned char  first,
const unsigned char  second 
)
inline

◆ isNotEqual() [16/24]

bool Ocean::NumericT< unsigned char >::isNotEqual ( const unsigned char  first,
const unsigned char  second,
const unsigned char  epsilon 
)
inline

◆ isNotEqual() [17/24]

bool Ocean::NumericT< unsigned int >::isNotEqual ( const unsigned int  first,
const unsigned int  second 
)
inline

◆ isNotEqual() [18/24]

bool Ocean::NumericT< unsigned int >::isNotEqual ( const unsigned int  first,
const unsigned int  second,
const unsigned int  epsilon 
)
inline

◆ isNotEqual() [19/24]

bool Ocean::NumericT< unsigned long >::isNotEqual ( const unsigned long  first,
const unsigned long  second 
)
inline

◆ isNotEqual() [20/24]

bool Ocean::NumericT< unsigned long >::isNotEqual ( const unsigned long  first,
const unsigned long  second,
const unsigned long  epsilon 
)
inline

◆ isNotEqual() [21/24]

bool Ocean::NumericT< unsigned long long >::isNotEqual ( const unsigned long long  first,
const unsigned long long  second 
)
inline

◆ isNotEqual() [22/24]

bool Ocean::NumericT< unsigned long long >::isNotEqual ( const unsigned long long  first,
const unsigned long long  second,
const unsigned long long  epsilon 
)
inline

◆ isNotEqual() [23/24]

bool Ocean::NumericT< unsigned short >::isNotEqual ( const unsigned short  first,
const unsigned short  second 
)
inline

◆ isNotEqual() [24/24]

bool Ocean::NumericT< unsigned short >::isNotEqual ( const unsigned short  first,
const unsigned short  second,
const unsigned short  epsilon 
)
inline

◆ isNotEqualEps() [1/12]

constexpr bool Ocean::NumericT< int >::isNotEqualEps ( const int  value)
inlineconstexpr

◆ isNotEqualEps() [2/12]

constexpr bool Ocean::NumericT< long long >::isNotEqualEps ( const long long  value)
inlineconstexpr

◆ isNotEqualEps() [3/12]

constexpr bool Ocean::NumericT< long >::isNotEqualEps ( const long  value)
inlineconstexpr

◆ isNotEqualEps() [4/12]

constexpr bool Ocean::NumericT< short >::isNotEqualEps ( const short  value)
inlineconstexpr

◆ isNotEqualEps() [5/12]

constexpr bool Ocean::NumericT< signed char >::isNotEqualEps ( const signed char  value)
inlineconstexpr

◆ isNotEqualEps() [6/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isNotEqualEps ( const std::complex< T > &  value)
inlinestaticconstexpr

Returns whether a complex value is not smaller than or equal to a small epsilon.

Parameters
valueComplex value to check
Returns
True, if so

◆ isNotEqualEps() [7/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isNotEqualEps ( const T  value)
inlinestaticconstexpr

Returns whether a value is not smaller than or equal to a small epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isNotEqualEps() [8/12]

constexpr bool Ocean::NumericT< unsigned char >::isNotEqualEps ( const unsigned char  value)
inlineconstexpr

◆ isNotEqualEps() [9/12]

constexpr bool Ocean::NumericT< unsigned int >::isNotEqualEps ( const unsigned int  value)
inlineconstexpr

◆ isNotEqualEps() [10/12]

constexpr bool Ocean::NumericT< unsigned long long >::isNotEqualEps ( const unsigned long long  value)
inlineconstexpr

◆ isNotEqualEps() [11/12]

constexpr bool Ocean::NumericT< unsigned long >::isNotEqualEps ( const unsigned long  value)
inlineconstexpr

◆ isNotEqualEps() [12/12]

constexpr bool Ocean::NumericT< unsigned short >::isNotEqualEps ( const unsigned short  value)
inlineconstexpr

◆ isNotWeakEqual() [1/12]

bool Ocean::NumericT< int >::isNotWeakEqual ( const int  first,
const int  second 
)
inline

◆ isNotWeakEqual() [2/12]

bool Ocean::NumericT< long >::isNotWeakEqual ( const long  first,
const long  second 
)
inline

◆ isNotWeakEqual() [3/12]

bool Ocean::NumericT< long long >::isNotWeakEqual ( const long long  first,
const long long  second 
)
inline

◆ isNotWeakEqual() [4/12]

bool Ocean::NumericT< short >::isNotWeakEqual ( const short  first,
const short  second 
)
inline

◆ isNotWeakEqual() [5/12]

bool Ocean::NumericT< signed char >::isNotWeakEqual ( const signed char  first,
const signed char  second 
)
inline

◆ isNotWeakEqual() [6/12]

template<typename T >
bool Ocean::NumericT< T >::isNotWeakEqual ( const std::complex< T > &  first,
const std::complex< T > &  second 
)
inlinestatic

Returns whether two complex values are not equal up to a weak epsilon.

Parameters
firstThe first value to check
secondThe second value to check
Returns
True, if so

◆ isNotWeakEqual() [7/12]

template<typename T >
bool Ocean::NumericT< T >::isNotWeakEqual ( const T  first,
const T  second 
)
inlinestatic

Returns whether two values are not equal up to a weak epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isNotWeakEqual() [8/12]

bool Ocean::NumericT< unsigned char >::isNotWeakEqual ( const unsigned char  first,
const unsigned char  second 
)
inline

◆ isNotWeakEqual() [9/12]

bool Ocean::NumericT< unsigned int >::isNotWeakEqual ( const unsigned int  first,
const unsigned int  second 
)
inline

◆ isNotWeakEqual() [10/12]

bool Ocean::NumericT< unsigned long >::isNotWeakEqual ( const unsigned long  first,
const unsigned long  second 
)
inline

◆ isNotWeakEqual() [11/12]

bool Ocean::NumericT< unsigned long long >::isNotWeakEqual ( const unsigned long long  first,
const unsigned long long  second 
)
inline

◆ isNotWeakEqual() [12/12]

bool Ocean::NumericT< unsigned short >::isNotWeakEqual ( const unsigned short  first,
const unsigned short  second 
)
inline

◆ isNotWeakEqualEps() [1/12]

constexpr bool Ocean::NumericT< int >::isNotWeakEqualEps ( const int  value)
inlineconstexpr

◆ isNotWeakEqualEps() [2/12]

constexpr bool Ocean::NumericT< long long >::isNotWeakEqualEps ( const long long  value)
inlineconstexpr

◆ isNotWeakEqualEps() [3/12]

constexpr bool Ocean::NumericT< long >::isNotWeakEqualEps ( const long  value)
inlineconstexpr

◆ isNotWeakEqualEps() [4/12]

constexpr bool Ocean::NumericT< short >::isNotWeakEqualEps ( const short  value)
inlineconstexpr

◆ isNotWeakEqualEps() [5/12]

constexpr bool Ocean::NumericT< signed char >::isNotWeakEqualEps ( const signed char  value)
inlineconstexpr

◆ isNotWeakEqualEps() [6/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isNotWeakEqualEps ( const std::complex< T > &  value)
inlinestaticconstexpr

Returns whether a complex value is not smaller than or equal to a weak epsilon.

Parameters
valueComplex value to check
Returns
True, if so

◆ isNotWeakEqualEps() [7/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isNotWeakEqualEps ( const T  value)
inlinestaticconstexpr

Returns whether a value is not smaller than or equal to a weak epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isNotWeakEqualEps() [8/12]

constexpr bool Ocean::NumericT< unsigned char >::isNotWeakEqualEps ( const unsigned char  value)
inlineconstexpr

◆ isNotWeakEqualEps() [9/12]

constexpr bool Ocean::NumericT< unsigned int >::isNotWeakEqualEps ( const unsigned int  value)
inlineconstexpr

◆ isNotWeakEqualEps() [10/12]

constexpr bool Ocean::NumericT< unsigned long long >::isNotWeakEqualEps ( const unsigned long long  value)
inlineconstexpr

◆ isNotWeakEqualEps() [11/12]

constexpr bool Ocean::NumericT< unsigned long >::isNotWeakEqualEps ( const unsigned long  value)
inlineconstexpr

◆ isNotWeakEqualEps() [12/12]

constexpr bool Ocean::NumericT< unsigned short >::isNotWeakEqualEps ( const unsigned short  value)
inlineconstexpr

◆ isWeakEqual() [1/3]

bool Ocean::NumericT< int >::isWeakEqual ( const int  first,
const int  second 
)
inline

◆ isWeakEqual() [2/3]

template<typename T >
bool Ocean::NumericT< T >::isWeakEqual ( const std::complex< T > &  first,
const std::complex< T > &  second 
)
inlinestatic

Returns whether two complex values are equal up to a weak epsilon.

Parameters
firstThe first value to check
secondThe second value to check
Returns
True, if so

◆ isWeakEqual() [3/3]

template<typename T >
bool Ocean::NumericT< T >::isWeakEqual ( const T  first,
const T  second 
)
inlinestatic

Returns whether two values a equal up to a weak epsilon.

Parameters
firstThe first value to check, with range (-infinity, infinity)
secondThe second value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isWeakEqualEps() [1/12]

constexpr bool Ocean::NumericT< int >::isWeakEqualEps ( const int  value)
inlineconstexpr

◆ isWeakEqualEps() [2/12]

constexpr bool Ocean::NumericT< long long >::isWeakEqualEps ( const long long  value)
inlineconstexpr

◆ isWeakEqualEps() [3/12]

constexpr bool Ocean::NumericT< long >::isWeakEqualEps ( const long  value)
inlineconstexpr

◆ isWeakEqualEps() [4/12]

constexpr bool Ocean::NumericT< short >::isWeakEqualEps ( const short  value)
inlineconstexpr

◆ isWeakEqualEps() [5/12]

constexpr bool Ocean::NumericT< signed char >::isWeakEqualEps ( const signed char  value)
inlineconstexpr

◆ isWeakEqualEps() [6/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isWeakEqualEps ( const std::complex< T > &  value)
inlinestaticconstexpr

Returns whether a complex value is smaller than or equal to a weak epsilon.

Parameters
valueComplex value to check
Returns
True, if so

◆ isWeakEqualEps() [7/12]

template<typename T >
constexpr bool Ocean::NumericT< T >::isWeakEqualEps ( const T  value)
inlinestaticconstexpr

Returns whether a value is smaller than or equal to a weak epsilon.

Parameters
valueThe value to check, with range (-infinity, infinity)
Returns
True, if so

◆ isWeakEqualEps() [8/12]

constexpr bool Ocean::NumericT< unsigned char >::isWeakEqualEps ( const unsigned char  value)
inlineconstexpr

◆ isWeakEqualEps() [9/12]

constexpr bool Ocean::NumericT< unsigned int >::isWeakEqualEps ( const unsigned int  value)
inlineconstexpr

◆ isWeakEqualEps() [10/12]

constexpr bool Ocean::NumericT< unsigned long long >::isWeakEqualEps ( const unsigned long long  value)
inlineconstexpr

◆ isWeakEqualEps() [11/12]

constexpr bool Ocean::NumericT< unsigned long >::isWeakEqualEps ( const unsigned long  value)
inlineconstexpr

◆ isWeakEqualEps() [12/12]

constexpr bool Ocean::NumericT< unsigned short >::isWeakEqualEps ( const unsigned short  value)
inlineconstexpr

◆ log() [1/2]

float Ocean::NumericT< float >::log ( const float  value)
inline

◆ log() [2/2]

template<typename T >
T Ocean::NumericT< T >::log ( const T  value)
inlinestatic

Returns the natural logarithm of a given value (the logarithm to the base e).

Parameters
valueThe value to return the logarithm for, with range (0, infinity)
Returns
Natural logarithm

◆ log10() [1/2]

float Ocean::NumericT< float >::log10 ( const float  value)
inline

◆ log10() [2/2]

template<typename T >
T Ocean::NumericT< T >::log10 ( const T  value)
inlinestatic

Returns the logarithm to base 10 of a given value.

Parameters
valueThe value to return the logarithm for, with range (0, infinity)
Returns
Logarithm to base 10

◆ log1p() [1/2]

float Ocean::NumericT< float >::log1p ( const float  value)
inline

◆ log1p() [2/2]

template<typename T >
T Ocean::NumericT< T >::log1p ( const T  value)
inlinestatic

Returns the natural logarithm of a given value plus 1 (the logarithm to the base e).

This function has better precision than log(1 + value) when value is close to 0.

Parameters
valueInput for which logarithm of (1 + value) will be returned, with range (-1, infinity)
Returns
Natural logarithm

◆ log2() [1/2]

float Ocean::NumericT< float >::log2 ( const float  value)
inline

Specialization of NumericT::log2().

See also
NumericT::log2().

◆ log2() [2/2]

template<typename T >
T Ocean::NumericT< T >::log2 ( const T  value)
inlinestatic

Returns the logarithm to base 2 of a given value.

Parameters
valueThe value to return the logarithm for, with range (0, infinity)
Returns
Logarithm to base 2

◆ maxValue()

template<typename T >
constexpr T Ocean::NumericT< T >::maxValue
inlinestaticconstexpr

Returns the max scalar value.

Returns
Max value

◆ minValue()

template<typename T >
constexpr T Ocean::NumericT< T >::minValue
inlinestaticconstexpr

Returns the min scalar value.

Returns
Min value

◆ nan()

template<typename T >
constexpr T Ocean::NumericT< T >::nan
inlinestaticconstexpr

Returns a value which is not a number (nan).

Returns
The nan value

◆ normalizedGaussianDistribution() [1/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution ( const T  x,
const T  sigma 
)
inlinestatic

Returns a value of the normalized univariate Gaussian distribution centered around the origin.

As the result is normalized, the resulting Gaussian distribution value is 1 at the origin.

Parameters
xValue to return the Gaussian distribution value for
sigmaThe sigma parameter defining the standard deviation of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ normalizedGaussianDistribution() [2/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution ( const T  x,
const T  x0,
const T  sigma 
)
inlinestatic

Returns a value of the normalized univariate Gaussian distribution around a given position x0.

As the result is normalized, the resulting Gaussian distribution value is 1 at the given position x0.

Parameters
xValue to return the Gaussian distribution value for
x0X value for the center of the Gaussian distribution
sigmaThe sigma parameter defining the standard deviation of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ normalizedGaussianDistribution2() [1/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution2 ( const T  x,
const T  y,
const T  sigmaX,
const T  sigmaY 
)
inlinestatic

Returns a value of the normalized bivariate Gaussian distribution centered around the origin.

As the result is normalized, the resulting Gaussian distribution value is 1 at the origin.

Parameters
xX value for the function
yY value for the function
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ normalizedGaussianDistribution2() [2/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution2 ( const T  x,
const T  y,
const T  x0,
const T  y0,
const T  sigmaX,
const T  sigmaY 
)
inlinestatic

Returns a value of the normalized bivariate Gaussian distribution centered around a given position (x0, y0).

As the result is normalized, the resulting Gaussian distribution value is 1 at the given position (x0, y0).

Parameters
xX value for the function
yY value for the function
x0X value for the center of the Gaussian distribution
y0Y value for the center of the Gaussian distribution
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ normalizedGaussianDistribution3() [1/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution3 ( const T  x,
const T  y,
const T  z,
const T  sigmaX,
const T  sigmaY,
const T  sigmaZ 
)
inlinestatic

Returns a value of the normalized trivariate Gaussian distribution centered around the origin.

As the result is normalized, the resulting Gaussian distribution value is 1 at the origin.

Parameters
xX value for the function
yY value for the function
zZ value for the function
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
sigmaZSigma parameter defining the standard deviation for the z-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ normalizedGaussianDistribution3() [2/2]

template<typename T >
T Ocean::NumericT< T >::normalizedGaussianDistribution3 ( const T  x,
const T  y,
const T  z,
const T  x0,
const T  y0,
const T  z0,
const T  sigmaX,
const T  sigmaY,
const T  sigmaZ 
)
inlinestatic

Returns a value of the normalized trivariate Gaussian distribution centered around a given position (x0, y0, z0).

As the result is normalized, the resulting Gaussian distribution value is 1 at the given position (x0, y0, z0).

Parameters
xX value for the function
yY value for the function
zZ value for the function
x0X value for the center of the Gaussian distribution
y0Y value for the center of the Gaussian distribution
z0Z value for the center of the Gaussian distribution
sigmaXSigma parameter defining the standard deviation for the x-axis of the Gaussian distribution, with range (0, infinity)
sigmaYSigma parameter defining the standard deviation for the y-axis of the Gaussian distribution, with range (0, infinity)
sigmaZSigma parameter defining the standard deviation for the z-axis of the Gaussian distribution, with range (0, infinity)
Returns
Function value

◆ pi()

template<typename T >
constexpr T Ocean::NumericT< T >::pi
staticconstexpr

Returns PI which is equivalent to 180 degree.

Returns
PI

◆ pi2()

template<typename T >
constexpr T Ocean::NumericT< T >::pi2
staticconstexpr

Returns 2*PI which is equivalent to 360 degree.

Returns
2*PI

◆ pi_2()

template<typename T >
constexpr T Ocean::NumericT< T >::pi_2
staticconstexpr

Returns PI/2 which is equivalent to 90 degree.

Returns
PI/2

◆ pi_3()

template<typename T >
constexpr T Ocean::NumericT< T >::pi_3
staticconstexpr

Returns PI/3 which is equivalent to 60 degree.

Returns
PI/3

◆ pi_4()

template<typename T >
constexpr T Ocean::NumericT< T >::pi_4
staticconstexpr

Returns PI/4 which is equivalent to 45 degree.

Returns
PI/4

◆ pow() [1/3]

float Ocean::NumericT< float >::pow ( const float  x,
const float  y 
)
inline

Specialization of NumericT::pow().

See also
NumericT::pow().

◆ pow() [2/3]

template<typename T >
std::complex< T > Ocean::NumericT< T >::pow ( const std::complex< T > &  x,
const T  y 
)
inlinestatic

Returns x raised to the power of y.

Parameters
xX value
yY value
Returns
The power result

◆ pow() [3/3]

template<typename T >
T Ocean::NumericT< T >::pow ( const T  x,
const T  y 
)
inlinestatic

Returns x raised to the power of y.

Parameters
xX value, with range (-infinity, infinity), must not be negative if y < 1
yY value, with range (-infinity, infinity)
Returns
The power result

◆ pythagoras()

template<typename T >
T Ocean::NumericT< T >::pythagoras ( const T  a,
const T  b 
)
static

Returns the length of the hypotenuse of a given right-angled triangle.

This function avoids the calculation of square values of a and b.

Parameters
aLength of the first leg
bLength of the second leg
Returns
(a^2 + b^2)^0.5

◆ rad2deg()

template<typename T >
constexpr T Ocean::NumericT< T >::rad2deg ( const T  rad)
inlinestaticconstexpr

Converts rad to deg.

Parameters
radAngle in radian, with range (-infinity, infinity)
Returns
Angle in deg

◆ ratio()

template<typename T >
constexpr T Ocean::NumericT< T >::ratio ( const T  nominator,
const T  denominator,
const T  fallback = T(1) 
)
inlinestaticconstexpr

Returns the ratio between two values if the denominator is not equal a small epsilon.

Parameters
nominatorThe nominator of the resulting ratio
denominatorThe denominator of the resulting ratio
fallbackThe fallback value if the denominator is equal eps()
Returns
The ratio between both values, the 'fallback' if the denominator is equal eps()

◆ round32()

template<typename T >
constexpr int32_t Ocean::NumericT< T >::round32 ( const T  value)
inlinestaticconstexpr

Returns the rounded 32 bit integer value of a given value.

The function applies a symmetric rounding:

Input:     -1.50   -1.49  -0.50   -0.49   |   0.49   0.50    1.49   1.50
Output:    -2      -1     -1       0      |   0      1       1      2

So that for positive integer x:
x  <-  [x - 0.5, x + 0.5)

and for negative integer x:
x  <-  (x - 0.5, x + 0.5]
Parameters
valueThe value to handle, with range (-infinity, infinity)
Returns
Rounded value

◆ round64()

template<typename T >
constexpr int64_t Ocean::NumericT< T >::round64 ( const T  value)
inlinestaticconstexpr

Returns the rounded 64 bit integer value of a given value.

The function applies a symmetric rounding:

Input:     -1.50   -1.49  -0.50   -0.49   |   0.49   0.50    1.49   1.50
Output:    -2      -1     -1       0      |   0      1       1      2

So that for positive integer x:
x  <-  [x - 0.5, x + 0.5)

and for negative integer x:
x  <-  (x - 0.5, x + 0.5]
Parameters
valueThe value to handle, with range (-infinity, infinity)
Returns
Rounded value

◆ secureAbs() [1/13]

double Ocean::NumericT< double >::secureAbs ( const double  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [2/13]

float Ocean::NumericT< float >::secureAbs ( const float  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [3/13]

unsigned int Ocean::NumericT< int >::secureAbs ( const int  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [4/13]

unsigned long long Ocean::NumericT< long long >::secureAbs ( const long long  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [5/13]

unsigned long Ocean::NumericT< long >::secureAbs ( const long  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [6/13]

unsigned short Ocean::NumericT< short >::secureAbs ( const short  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [7/13]

unsigned char Ocean::NumericT< signed char >::secureAbs ( const signed char  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [8/13]

template<typename T >
UnsignedTyper< T >::Type Ocean::NumericT< T >::secureAbs ( const T  value)
inlinestatic

Returns the absolute value of a given value while the return value is guaranteed to be the absolute value of the input value.

This function returns the unsigned data type T (if possible) and ensures that the absolute value of the minimal integer value is correct.

Parameters
valueThe value for which the absolute value will be returned
Returns
Absolute value
See also
abs().

◆ secureAbs() [9/13]

unsigned char Ocean::NumericT< unsigned char >::secureAbs ( const unsigned char  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [10/13]

unsigned int Ocean::NumericT< unsigned int >::secureAbs ( const unsigned int  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [11/13]

unsigned long long Ocean::NumericT< unsigned long long >::secureAbs ( const unsigned long long  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [12/13]

unsigned long Ocean::NumericT< unsigned long >::secureAbs ( const unsigned long  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ secureAbs() [13/13]

unsigned short Ocean::NumericT< unsigned short >::secureAbs ( const unsigned short  value)
inline

Specialization of NumericT::secureAbs().

See also
NumericT::secureAbs().

◆ sign()

template<typename T >
constexpr T Ocean::NumericT< T >::sign ( const T &  value)
inlinestaticconstexpr

Returns the sign of a given value by either returning -1, 0, or +1.

Negative values have return value -1, 0 has return value 0, and positive values have return value +1.

Parameters
valueThe value for which the sign will be returned

◆ sin() [1/2]

float Ocean::NumericT< float >::sin ( const float  value)
inline

Specialization of NumericT::sin().

See also
NumericT::sin().

◆ sin() [2/2]

template<typename T >
T Ocean::NumericT< T >::sin ( const T  value)
inlinestatic

Returns the sine of a given value.

Parameters
valueThe value to return the sine from, with range (-infinity, infinity)
Returns
Sine value

◆ sqr()

template<typename T >
constexpr T Ocean::NumericT< T >::sqr ( const T  value)
inlinestaticconstexpr

Returns the square of a given value.

Parameters
valueThe value to return the square from
Returns
Square value

◆ sqrDistance()

template<typename T >
constexpr T Ocean::NumericT< T >::sqrDistance ( const T  value0,
const T  value1 
)
inlinestaticconstexpr

Returns the square distance between two values.

Parameters
value0First value
value1Second value
Returns
Square distance

◆ sqrt() [1/4]

float Ocean::NumericT< float >::sqrt ( const float  value)
inline

Specialization of NumericT::sqrt().

See also
NumericT::sqrt().

◆ sqrt() [2/4]

int Ocean::NumericT< int >::sqrt ( const int  value)
inline

Specialization of NumericT::sqrt().

See also
NumericT::sqrt().

◆ sqrt() [3/4]

template<typename T >
std::complex< T > Ocean::NumericT< T >::sqrt ( const std::complex< T > &  value)
inlinestatic

Returns the square root of a given value.

Parameters
valueThe value to return the square root from
Returns
Square root

◆ sqrt() [4/4]

template<typename T >
T Ocean::NumericT< T >::sqrt ( const T  value)
inlinestatic

Returns the square root of a given value.

Parameters
valueThe value to return the square root from, with range [0, infinity)
Returns
Square root

◆ squarePi()

template<typename T >
constexpr T Ocean::NumericT< T >::squarePi
staticconstexpr

Returns the square of PI i.e., PI^2.

Returns
PI^2

◆ squarePi2()

template<typename T >
constexpr T Ocean::NumericT< T >::squarePi2
staticconstexpr

Returns the square of two PI i.e., (2*PI)^2.

Returns
(2*PI)^2

◆ squarePi_2()

template<typename T >
constexpr T Ocean::NumericT< T >::squarePi_2
staticconstexpr

Returns the square of PI half i.e., (PI/2)^2.

Returns
(PI/2)^2

◆ sum()

template<typename T >
T Ocean::NumericT< T >::sum ( const T *  values,
const size_t  number 
)
inlinestatic

Returns the sum of given values.

Parameters
valuesThe values to return the sum from
numberThe number of given values
Returns
Sum of elements

◆ summedSqr()

template<typename T >
T Ocean::NumericT< T >::summedSqr ( const T *  values,
const size_t  number 
)
inlinestatic

Returns the summed squares of a given values.

Parameters
valuesThe values to return the summed squares from
numberThe number of given values
Returns
Summed squared result

◆ tan() [1/2]

float Ocean::NumericT< float >::tan ( const float  value)
inline

Specialization of NumericT::tan().

See also
NumericT::tan().

◆ tan() [2/2]

template<typename T >
T Ocean::NumericT< T >::tan ( const T  value)
inlinestatic

Returns the tangent of a given value.

Parameters
valueThe value to return the tangent from, with range (-infinity, infinity)
Returns
Tangent value

◆ weakEps() [1/13]

template<typename T >
static constexpr T Ocean::NumericT< T >::weakEps ( )
staticconstexpr

Returns a weak epsilon.

Returns
Weak epsilon

◆ weakEps() [2/13]

constexpr double Ocean::NumericT< double >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [3/13]

constexpr float Ocean::NumericT< float >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [4/13]

constexpr signed char Ocean::NumericT< signed char >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [5/13]

constexpr unsigned char Ocean::NumericT< unsigned char >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [6/13]

constexpr short Ocean::NumericT< short >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [7/13]

constexpr unsigned short Ocean::NumericT< unsigned short >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [8/13]

constexpr int Ocean::NumericT< int >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [9/13]

constexpr unsigned int Ocean::NumericT< unsigned int >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [10/13]

constexpr long Ocean::NumericT< long >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [11/13]

constexpr unsigned long Ocean::NumericT< unsigned long >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [12/13]

constexpr long long Ocean::NumericT< long long >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

◆ weakEps() [13/13]

constexpr unsigned long long Ocean::NumericT< unsigned long long >::weakEps ( )
constexpr

Specialization of NumericT::weakEps().

See also
NumericT::weakEps().

The documentation for this class was generated from the following file: