|
template<typename T> |
T | abs (const T &x) |
| if x < 0 return -x, else return x.
|
|
template<typename T> |
T | sign (const T &x) |
| if x < 0 return -1, else if x > 0 return 1, else return 0.
|
|
template<typename T> |
T | sqr (const T &x) |
| return x * x
|
|
template<typename T> |
T | inv (const T &x) |
| return x ^ -1
|
|
template<typename T> |
T | cubic (const T &x) |
| return x * x * x
|
|
template<typename T> |
T | pow (const T &x, const T &p) |
| return exp(p * log(x));
|
|
template<typename T> |
T | log2 (const T &x) |
| return log(x) / log(2)
|
|
template<typename T> |
T | log10 (const T &x) |
| return log(x) / log(10)
|
|
template<typename T> |
T | norm (const T &x) |
| return norm of x as if x is real part of complex number: sqr(x)
|
|
template<typename T> |
T | conj (const T &x) |
| return conjugate as if x is a complex number: x
|
|
template<typename T> |
const T & | clamp (const T &x, const T &min, const T &max) |
| if x < min return min, else if x > max return max, else return x.
|
|
template<typename T> |
T | lerp (const T &a, const T &b, const T &f) |
| linear interpolation between a and b
|
|
template<typename T> |
T | pow2dB (const T &power) |
| power to decibels: y = 10 * log10(x)
|
|
template<typename T> |
T | amp2dB (const T &litude) |
| amplitude to decibels: y = 20 * log10(x)
|
|
template<typename T> |
T | dB2pow (const T &decibels) |
| decibels to power: y = num::pow(10, x / 10)
|
|
template<typename T> |
T | dB2amp (const T &decibels) |
| decibels to amplitude: y = num::pow(10, x / 20)
|
|
template<typename T> |
T | p2dB (const T &iValue) |
| Converts an absolute acoustical pressure into decibels.
|
|
template<typename T> |
T | W2dB (const T &iValue) |
| Converts a absolute acoustical power into decibels.
|
|
template<typename T> |
T | I2dB (const T &iValue) |
| Converts an intensity into decibels.
|
|
template<typename T> |
T | dB2p (const T &iValue) |
| Converts decibels into a pressure .
|
|
template<typename T> |
T | dB2W (const T &iValue) |
| Converts decibels into a power.
|
|
template<typename T> |
T | dB2I (const T &iValue) |
| Converts decibels into an intensity.
|
|
template<class T, class RG> |
T | uniform (RG &generator) |
|
template<class T, class RG> |
T | unitGauss (RG &generator) |
|
template<class T, class RG> |
T | gauss (RG &generator, typename util::CallTraits< T >::TParam mean, typename util::CallTraits< T >::TParam stddev) |
|
template<typename T, typename S1, typename S2> |
Vector< T, impl::MVRightProd< T, S1, S2 > > | operator* (const Matrix< T, S1 > &iA, const Vector< T, S2 > &iB) |
| multiply matrix with column vector
|
|
template<typename T, typename S> |
Matrix< T, impl::MVDiag< T, S > > | diagonal (const Vector< T, S > &iB) |
| Create diagonal matrix from vector.
|
|
template<typename T, typename S> |
void | solve (const Matrix< T, S > &iA, Vector< T > &iB) |
| Solves set of equation A * X == B.
|
|
template<class C> |
bool | isInf (const C &iV) |
| return true if iV equals minus or plus Infinity
|
|
std::string | str (float iV) |
|
std::string | str (double iV) |
|
template<class C> |
std::string | str (const std::complex< C > &iV) |
|
std::string | str (int iV) |
|
std::string | str (long iV) |
|
template<typename T, typename RandomGenerator> |
T | distributeUniform (RandomGenerator &generator, T infimum, T supremum) |
| draw a random number from generator and transform it by a uniform distribution
|
|
template<typename T, typename RandomGenerator> |
T | distributeExponential (RandomGenerator &generator, T rateOfChange) |
| draw a random number from generator and transform it by a exponential distribution
|
|
template<typename T, typename RandomGenerator> |
T | distributeNormal (RandomGenerator &generator, T mean, T standardDeviation) |
| draw a random number from generator and transform it by a normal distribution
|
|
template<typename T, typename S1, typename S2> |
bool | operator== (const Matrix< T, S1 > &a, const Matrix< T, S2 > &b) |
|
template<typename T, typename S1, typename S2> |
bool | operator!= (const Matrix< T, S1 > &a, const Matrix< T, S2 > &b) |
|
template<typename T, typename S1, typename S2> |
const Matrix< T, impl::MAdd< T, S1, S2 > > | operator+ (const Matrix< T, S1 > &a, const Matrix< T, S2 > &b) |
| componentwise addition
|
|
template<typename T, typename S1, typename S2> |
const Matrix< T, impl::MSub< T, S1, S2 > > | operator- (const Matrix< T, S1 > &a, const Matrix< T, S2 > &b) |
| componentwise addition
|
|
template<typename T, typename S1, typename S2> |
const Matrix< T, impl::MProd< T, S1, S2 > > | operator* (const Matrix< T, S1 > &a, const Matrix< T, S2 > &b) |
| Matrix multiplication.
|
|
template<typename T, typename S> |
const Matrix< T, impl::MAdd< T, impl::MScalar< T >, S > > | operator+ (const T &a, const Matrix< T, S > &b) |
| add a to all components of b
|
|
template<typename T, typename S> |
const Matrix< T, impl::MSub< T, impl::MScalar< T >, S > > | operator- (const T &a, const Matrix< T, S > &b) |
| add a to all negated components of b
|
|
template<typename T, typename S> |
const Matrix< T, impl::MMul< T, impl::MScalar< T >, S > > | operator* (const T &a, const Matrix< T, S > &b) |
| multiply a with all components of b
|
|
template<typename T, typename S> |
const Matrix< T, impl::MAdd< T, S, impl::MScalar< T > > > | operator+ (const Matrix< T, S > &a, typename Matrix< T, S >::TParam b) |
| add b to all components of a
|
|
template<typename T, typename S> |
const Matrix< T, impl::MAdd< T, S, impl::MScalar< T > > > | operator- (const Matrix< T, S > &a, typename Matrix< T, S >::TParam b) |
| subtract b from all components of a
|
|
template<typename T, typename S> |
const Matrix< T, impl::MMul< T, S, impl::MScalar< T > > > | operator* (const Matrix< T, S > &a, typename Matrix< T, S >::TParam b) |
| multiply all components of a with b.
|
|
template<typename T, typename S> |
const Matrix< T, impl::MMul< T, S, impl::MScalar< T > > > | operator/ (const Matrix< T, S > &a, typename Matrix< T, S >::TParam b) |
| divide all components of a by b.
|
|
template<typename T, typename S, typename S2> |
void | solve (const Matrix< T, S > &a, Matrix< T, S2 > &bx, bool improve) |
| solve equation A * X = B
|
|
template<typename T, typename S1, typename S2> |
Vector< T, impl::MVRightProd< T, S1, S2 > > | operator* (const Matrix< T, S1 > &iA, const Vector< T, S2 > &iB) |
| multiply matrix with column vector
|
|
template<typename T, typename S> |
Matrix< T, impl::MVDiag< T, S > > | diagonal (const Vector< T, S > &iB) |
| Create diagonal matrix from vector.
|
|
template<typename T, typename S> |
void | solve (const Matrix< T, S > &iA, Vector< T > &iB) |
| Solves set of equation A * X == B.
|
|
const TriBool | unknown (TriBool::sUnknown) |
| constant to be used as new keyword like true and false
|
|
template<typename T, typename S1, typename S2> |
const T | dot (const Vector< T, S1 > &iA, const Vector< T, S2 > &iB) |
| dot product.
|
|
template<typename T, typename S1, typename S2> |
const Vector< T, impl::VAdd< T, S1, S2 > > | operator+ (const Vector< T, S1 > &iA, const Vector< T, S2 > &iB) |
| componentwise addition
|
|
template<typename T, typename S1, typename S2> |
const Vector< T, impl::VSub< T, S1, S2 > > | operator- (const Vector< T, S1 > &iA, const Vector< T, S2 > &iB) |
| componentwise subtraction
|
|
template<typename T, typename S1, typename S2> |
const Vector< T, impl::VMul< T, S1, S2 > > | operator* (const Vector< T, S1 > &iA, const Vector< T, S2 > &iB) |
| componentwise multiplication
|
|
template<typename T, typename S1, typename S2> |
const Vector< T, impl::VDiv< T, S1, S2 > > | operator/ (const Vector< T, S1 > &iA, const Vector< T, S2 > &iB) |
| componentwise division
|
|
template<typename T, typename S> |
const Vector< T, impl::VAdd< T, impl::VScalar< T >, S > > | operator+ (const T &iA, const Vector< T, S > &iB) |
| add iA to all components of iB
|
|
template<typename T, typename S> |
const Vector< T, impl::VSub< T, impl::VScalar< T >, S > > | operator- (const T &iA, const Vector< T, S > &iB) |
| add iA to all negated components of iB
|
|
template<typename T, typename S> |
const Vector< T, impl::VMul< T, impl::VScalar< T >, S > > | operator* (const T &iA, const Vector< T, S > &iB) |
| multiply iA with all components of iB
|
|
template<typename T, typename S> |
const Vector< T, impl::VDiv< T, impl::VScalar< T >, S > > | operator/ (const T &iA, const Vector< T, S > &iB) |
| multiply iA with all reciprocal components of iB
|
|
template<typename T, typename S> |
const Vector< T, impl::VAdd< T, S, impl::VScalar< T > > > | operator+ (const Vector< T, S > &iA, const T &iB) |
| add iB to all components of iA
|
|
template<typename T, typename S> |
const Vector< T, impl::VSub< T, S, impl::VScalar< T > > > | operator- (const Vector< T, S > &iA, const T &iB) |
| subtract iB from all components of iA
|
|
template<typename T, typename S> |
const Vector< T, impl::VMul< T, S, impl::VScalar< T > > > | operator* (const Vector< T, S > &iA, const T &iB) |
| multiply all components of iA with iB.
|
|
template<typename T, typename S> |
const Vector< T, impl::VDiv< T, S, impl::VScalar< T > > > | operator/ (const Vector< T, S > &iA, const T &iB) |
| multiply all components of iA with iB.
|
|