Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Math


Basic mathematics

Normal classes:

 RandomGaussC Generate random number with a gaussian distribution.
 AngleC This class is designed to deal with angles in radians.
 ComplexC Complex algebra

Normal functions:

 Abs(const DataT &) Returns the absolute value of 'a'
 Abs(unsigned char) Returns the absolute value of 'a'
 Abs(unsigned short) Returns the absolute value of 'a'
 Abs(unsigned int) Returns the absolute value of 'a'
 Abs(unsigned long) Returns the absolute value of 'a'
 Sign(const DataT &) Returns the sign of the real number 'a'.
 Sign(RealT,RealT) Returns the value 'a' with a sign of 'b'.
 Round(RealT) Returns the value x rounded to the nearest integer.
 Floor(RealT) Returns the greatest integral value less than or equal to 'x'.
 SetToZero(DataT &) Set 'dat' to zero.
 Sqr(const DataT &) Returns the square of 'x'.
 Sqrt(RealT) Returns the square root of 'x'.
 Min(const DataT &,const DataT &) Returns the smaller value from 'a' and 'b'.
 Max(const DataT &,const DataT &) Returns the bigger value from 'a' and 'b'.
 Log(RealT) Returns log(r).
 Pow(RealT,RealT) Returns 'x' raised to the power 'y'.
 Pow(RealT,IntT) Returns 'x' raised to the power 'y' where y is an integer..
 Exp(RealT) Returns safe exp(r).
 ILog2(IntT) Interger Log 2
 Sin(RealT) Returns the sine of 'x'.
 ASin(RealT) Returns the arc sine of 'x'.
 Cos(RealT) Returns the cosine of 'x'.
 ACos(RealT) Returns the arc cosine of 'x'.
 ATan(RealT) Returns the arc tangent of 'x' in the range -pi/2 .. +pi/2.
 ATan2(RealT,RealT) Returns the arc tangent of 'y/x' in the range -pi .. +pi.
 Sinh(RealT) Returns the sine of 'x'.
 Cosh(RealT) Returns the cosine of 'x'.
 Pythag(RealT,RealT) Computes sqrt(sqr(a)+sqr(b)) without destructive overflow or underflow.
 IsSmall(RealT,RealT,RealT) Is a small relative to 'norm' ?
 IsAlmostZero(RealT,RealT) Test is a real value is near zero.
 MinComponent(DataT) Returns the smallest component from 'a'.
 MaxComponent(DataT) Returns the Biggest component from 'a'.
 ScaleMin(DataT,DataT) Returns the argument which has the smallest component from 'a' and 'b'.
 ScaleMax(DataT,DataT) Returns the argument which has the largest component from 'a' and 'b'.
 Average(const DataT &,const DataT &) Take average of 2 numbers.
 Average(const DataT &,const DataT &,const DataT &) Take average of 3 numbers.
 Average(const DataT &,const DataT &,const DataT &,const DataT &) Take average of 4 numbers.
 Average(const ByteT &,const ByteT &) Take average of 2 numbers.
 Average(const ByteT &,const ByteT &,const ByteT &) Take average of 3 numbers.
 Average(const ByteT &,const ByteT &,const ByteT &,const ByteT &) Take average of 4 numbers.
 Average(const SByteT &,const SByteT &) Take average of 2 numbers.
 Average(const SByteT &,const SByteT &,const SByteT &) Take average of 3 numbers.
 Average(const SByteT &,const SByteT &,const SByteT &,const SByteT &) Take average of 4 numbers.
 Average(const Int16T &,const Int16T &) Take average of 2 numbers.
 Average(const Int16T &,const Int16T &,const Int16T &) Take average of 3 numbers.
 Average(const Int16T &,const Int16T &,const Int16T &,const Int16T &) Take average of 4 numbers.
 Average(const UInt16T &,const UInt16T &) Take average of 2 numbers.
 Average(const UInt16T &,const UInt16T &,const UInt16T &) Take average of 3 numbers.
 Average(const UInt16T &,const UInt16T &,const UInt16T &,const UInt16T &) Take average of 4 numbers.
 Cbrt(RealT) Returns the cube root of 'x'.
 Erf(RealT) Returns the error function of x. Erf(x) = 2/sqrt(pi)*integral from 0 to x of exp(-t*t) dt.
 Erfc(RealT) Returns 1.0 - Erf(x). (Use when x is large)
 Log2(RealT) Returns logarithm to base 2.
 IsPow2(IntT) Is interger power of 2 ?
 IsInf(RealT) Is infinit ?
 IsPInf(RealT) Is positive infinity ?
 IsNInf(RealT) Is negative infinity ?
 IsNan(RealT) Is Not A Number ?
 Radians(RealT) Convert angle from degrees to radians.
 Degrees(RealT) Convert angle from radians to degrees.
 RandomInt(RandomSeedT &) Returns an integer between 0 and RandomIntMaxValue.
 RandomInt(void) Returns an integer between 0 and RandomIntMaxValue.
 Random1(RandomSeedT &) Returns a random number between 0 and 1 with a uniform distribution.
 Random1(void) Returns a random number between 0 and 1 with a uniform distribution.
 RandomGauss(void) Returns a Gaussian distributed zero mean random number with variance 1.0.
 operator <<(ostream &,const ComplexC &)
 operator >>(istream &,ComplexC &)
 operator +(RealT,const ComplexC &)
 operator +(const ComplexC &,RealT)
 operator +(const ComplexC &,const ComplexC &)
 operator -(RealT,const ComplexC &)
 operator -(const ComplexC &,RealT)
 operator -(const ComplexC &,const ComplexC &)
 operator *(RealT,const ComplexC &)
 operator *(const ComplexC &,RealT)
 operator *(const ComplexC &,const ComplexC &)
 operator /(const ComplexC &,RealT)
 operator /(const ComplexC &,const ComplexC &)
 operator /(RealT,const ComplexC &)
 operator ^(const ComplexC &,RealT)
 operator &&(const ComplexC &,const ComplexC &)
 Exp(const ComplexC &)
 CExp(RealT)
 Log(const ComplexC &)
 hypot(double,double)
 erf(double)
 erfc(double)
 isnan(double)
 isinf(double)
 nrand48(unsigned short *)
 erand48(unsigned short *)

Advanced classes:

 TFMatrixC Fixed size NxM matrix.

Advanced functions:

 SetZero(TFMatrixC &) Set vector to zero.
 MulAdd(const TFMatrixC &,const TFVectorC &,const TFVectorC &,TFVectorC &) Compute result = vec * mat + add;
 Mul(const TFMatrixC &,const TFVectorC &,TFVectorC &) Compute result = vec * mat;
 MulM(const TFMatrixC &,const TFMatrixC &,TFMatrixC &) Compute result = fmat * mat;
 TMul(const TFMatrixC &,const TFVectorC &,TFVectorC &) Compute result = mat.T() * vec;
 operator <<(ostream &,const TFMatrixC &)
 operator >>(istream &,TFMatrixC &)
 operator >>(BinIStreamC &,TFMatrixC &)
 operator <<(BinOStreamC &,const TFMatrixC &)
 operator *(const DataT &,const TFMatrixC &)
 operator /(const DataT &,const TFMatrixC &)
 operator *(const TFVectorC &,const TFMatrixC &) Vector multiply a matrix.

Develop classes:

 u_nan_t Smallest +ve value a float may have.
Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 10:00:48 2002