#include <iso_math.h>
Collaboration diagram for iso::math::Math:
Public Member Functions | |
int | powi (int pBase, int pExponent) const |
integer power function | |
template<class t> | |
t | min (t p1, t p2) |
returns the smaller of the two supplied values | |
template<class t> | |
t | max (t p1, t p2) |
returns the larger of the two supplied values | |
unsigned int | factorial (unsigned int pValue) |
returns factorial of an positive integer | |
bool | checkPowerOfTwo (unsigned int pValue) |
checks whether number is power of two | |
void | powerOfTwoRatio (real pFixValue, real &pVarValue) |
transforms second input value into a (larger) number that's related to the first input value by a power of two | |
real | random () |
return uniform random number (in between 0 - 1) | |
real | random (real pUpValue) |
return uniform random number (in between 0 - pUpValue) | |
real | random (real pLowValue, real pUpValue) |
return uniform random number (in between pLowValue - pUpValue) | |
real | uniformRandom () |
return uniform random number (in between 0 - 1) | |
real | uniformRandom (real pUpValue) |
return uniform random number (in between 0 - pUpValue) | |
real | uniformRandom (real pLowValue, real pUpValue) |
return uniform random number (in between pLowValue - pUpValue) | |
real | radian (real pValue) |
converts degrees to radians | |
real | degree (real pValue) |
converts radians to degrees | |
real | degreeToRadian (real pValue) |
converts degrees to radians | |
real | radianToDegree (real pValue) |
converts radians to degrees | |
real | complexToPhase (real aValue, real bValue) |
transforms complex number into polar angle | |
real | gaussian (real pXValue, real pMean, real pStd) |
gaussian function | |
real | hamming (real pXValue) |
hamming function | |
real | hann (real pXValue) |
hann function | |
real | kaiser (real pXValue) |
hann function | |
real | sigmoid (real pXValue, real pA) |
sigmoid function | |
real | nSigmoid (real pXValue, real pA) |
normalized sigmoid function | |
unsigned int | index (const Vector< unsigned int > &pSubdivisions, const Vector< unsigned int > &pPosition) throw (MathException) |
calculate index into n-dimensional array | |
Static Public Member Functions | |
static Math & | get () |
get singleton instance | |
static void | destroy () |
destroy singleton instance | |
Static Public Attributes | |
static const real | PI |
Protected Member Functions | |
Math () | |
PI default constructor. | |
~Math () | |
destructor | |
Protected Attributes | |
NEWRAN::Uniform * | mUniformRandom |
NEWRAN::MotherOfAll * | mURNG |
random number variable | |
Static Protected Attributes | |
static Math * | sMath |
newran generator |
that provides handy math functions and constants
Created by Daniel Bisig on 5/17/06. Copyright 2006 Daniel Bisig All rights reserved.
Math::Math | ( | ) | [protected] |
PI default constructor.
Math::~Math | ( | ) | [protected] |
destructor
Math & Math::get | ( | ) | [static] |
get singleton instance
void Math::destroy | ( | ) | [static] |
destroy singleton instance
int Math::powi | ( | int | pBase, | |
int | pExponent | |||
) | const [inline] |
integer power function
pBase | base | |
pExponent | exponent |
t iso::math::Math::min | ( | t | p1, | |
t | p2 | |||
) | [inline] |
returns the smaller of the two supplied values
p1 | first value | |
p2 | second value |
t iso::math::Math::max | ( | t | p1, | |
t | p2 | |||
) | [inline] |
returns the larger of the two supplied values
p1 | first value | |
p2 | second value |
unsigned int iso::math::Math::factorial | ( | unsigned int | pValue | ) | [inline] |
returns factorial of an positive integer
pValue | positive integer |
bool Math::checkPowerOfTwo | ( | unsigned int | pValue | ) |
checks whether number is power of two
transforms second input value into a (larger) number that's related to the first input value by a power of two
pFixValue | fixed input value | |
pVarValue | variable input value |
real Math::random | ( | ) |
return uniform random number (in between 0 - 1)
return uniform random number (in between 0 - pUpValue)
pUpValue | upper random number limit |
return uniform random number (in between pLowValue - pUpValue)
pLowValue | lower random number limit | |
pUpValue | upper random number limit |
real Math::uniformRandom | ( | ) |
return uniform random number (in between 0 - 1)
return uniform random number (in between 0 - pUpValue)
pUpValue | upper random number limit |
return uniform random number (in between pLowValue - pUpValue)
pLowValue | lower random number limit | |
pUpValue | upper random number limit |
transforms complex number into polar angle
aValue | aValue | |
bValue | bValue |
gaussian function
pXValue | x value | |
pMean | mean | |
pStd | standard deviation /return y value |
hamming function
pXValue | x value /return y value |
hann function
pXValue | x value /return y value |
hann function
pXValue | x value /return y value |
sigmoid function
pXValue | x value | |
pA | a value |
normalized sigmoid function
pXValue | x value | |
pA | a value |
unsigned int Math::index | ( | const Vector< unsigned int > & | pSubdivisions, | |
const Vector< unsigned int > & | pPosition | |||
) | throw (MathException) |
calculate index into n-dimensional array
pSubdivisions | array subdivisions | |
pPosition | position into array |
MathException | dimensions of subdivisons and position don't match or if positition is out of bounds |
NEWRAN::Uniform* iso::math::Math::mUniformRandom [protected] |
NEWRAN::MotherOfAll* iso::math::Math::mURNG [protected] |
random number variable
Math * Math::sMath [static, protected] |
newran generator