Inheritance diagram for base::Math:


| Public Member Functions | |
| virtual String | className () const | 
| virtual bool | isSameKindAs (const Object &) const | 
| Static Public Member Functions | |
| Real | degToRad (Real d) | 
| convert degrees to radians | |
| Real | radToDeg (Real r) | 
| convert radians to degrees | |
| Real | sqr (Real n) | 
| square (i.e. n*n) | |
| Real | sqrt (Real n) | 
| squate root (i.e. n^.5) | |
| Real | cube (Real n) | 
| cube (i.e. n*n*n) | |
| Real | abs (Real s) | 
| absolute value (i.e. |s|) | |
| Real | sign (Real n) | 
| sign (i.e. -1 if n<0, 0 if n=0, 1 if n>0) | |
| Real | pow (Real x, Real y) | 
| x raised to the power y | |
| Real | random () | 
| random number [0..1] | |
| bool | isNAN (Real n) | 
| true if n is Not-A-Number | |
| Real | sin (Real a) | 
| Real | cos (Real a) | 
| Real | tan (Real a) | 
| Real | asin (Real a) | 
| Real | acos (Real a) | 
| Real | atan (Real a) | 
| Real | atan2 (Real a, Real b) | 
| bool | equals (const Real r1, const Real r2, Real eps=consts::epsilon) | 
| equals within eps (i.e. true if |r1-r2| < eps) | |
| Real | zeroIfNeighbour (Real n, Real neighbourhoodRadius=consts::epsilon) | 
| 0 if in neighbourhood of 0 (i.e. 0 if |n| < neighbourhoodRadius, n otherwise) | |
| template<typename T> T | minimum (const T &t1, const T &t2) | 
| minimum (i.e. t1 if t1<t2, t2 otherwise) | |
| template<typename T> T | minimum (const T &t1, const T &t2, const T &t3) | 
| minimum (i.e. minimum(t1,t2) if minimum(t1,t2) < minimum(t2,t3), minimum(t2,t3) otherwise) | |
| template<typename T> T | maximum (const T &t1, const T &t2) | 
| maximum (i.e. t1 if t1>t2, t2 otherwise) | |
| template<typename T> T | maximum (const T &t1, const T &t2, const T &t3) | 
| maximum (i.e. maximum(t1,t2) if maximum(t1,t2) > maximum(t2,t3), maximum(t2,t3) otherwise) | |
| template<typename T> void | bound (T &v, const T &lower, const T &upper) | 
| bound a value to the specified range | |
| Real | normalizeAngle (Real angle) | 
| normalize angles (in radians) to the range (-pi..pi] | |
| Real | normalizeAngle2PI (Real angle) | 
| normalize angles (in radians) to the range [0..2pi) | |
| Real | angleDifference (Real angle1, Real angle2) | 
| void | decomposeLUP (const Matrix &A, Matrix &L, Matrix &U, Vector &Pi, Real epsilon=consts::epsilon2) | 
| Find LUP decomposition of Matrix. | |
| Vector | solveLUP (const Matrix &L, const Matrix &U, const Vector &Pi, const Vector &b) | 
| Solve for Ax = b, given LUP decomposition of A as L, U and Pi, and given b, returns x. | |
| Matrix | inverse (const Matrix &A, Real epsilon=consts::epsilon2) | 
| inverse of A (using LUP decomposition) | |
| Matrix | nullSpace (const Matrix &A, Int &nullSpaceRank, Real &k2) | 
| null-space of Matrix A (using Singular Value Decomposition - SVD) | |
| Matrix | pseudoInverse (const Matrix &A) | 
| the Moore-Penrose pseudo-inverse of A (using SVD) | |
| Protected Member Functions | |
| Math () | |
| Math (const Math &) | |
| virtual | ~Math () | 
NB: see also functions in Consts
Definition at line 45 of file Math.
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| 
 | 
| absolute value (i.e. |s|) 
 Definition at line 62 of file Math. References base::Real. | 
| 
 | 
| 
 Definition at line 80 of file Math. References base::Real. | 
| 
 | ||||||||||||
| difference between two angles (e.g. -160deg - 170deg = 30deg) Return is normalized (-pi..pi] | 
| 
 | 
| 
 Definition at line 79 of file Math. References base::Real. | 
| 
 | 
| 
 Definition at line 81 of file Math. References base::Real. | 
| 
 | ||||||||||||
| 
 Definition at line 82 of file Math. References base::Real. | 
| 
 | ||||||||||||||||||||
| bound a value to the specified range 
 | 
| 
 | 
| return the name of the object's class type. Must be defined by derived classes. Implements base::Object. Definition at line 48 of file Math. References base::String. | 
| 
 | 
| 
 Definition at line 77 of file Math. References base::Real. | 
| 
 | 
| cube (i.e. n*n*n) 
 Definition at line 60 of file Math. References base::Real. | 
| 
 | ||||||||||||||||||||||||
| Find LUP decomposition of Matrix. P is represented by the vector Pi, where the element values represent the column of P containing a 1. i.e. Pi[i]=j => P[i][j]=1 | 
| 
 | 
| convert degrees to radians 
 Definition at line 51 of file Math. References base::Real. | 
| 
 | ||||||||||||||||
| equals within eps (i.e. true if |r1-r2| < eps) 
 Definition at line 86 of file Math. References base::Real. | 
| 
 | ||||||||||||
| inverse of A (using LUP decomposition) 
 | 
| 
 | 
| true if n is Not-A-Number 
 Definition at line 72 of file Math. References base::Real. | 
| 
 | 
| 
 | 
| 
 | ||||||||||||||||||||
| maximum (i.e. maximum(t1,t2) if maximum(t1,t2) > maximum(t2,t3), maximum(t2,t3) otherwise) 
 | 
| 
 | ||||||||||||||||
| maximum (i.e. t1 if t1>t2, t2 otherwise) 
 | 
| 
 | ||||||||||||||||||||
| minimum (i.e. minimum(t1,t2) if minimum(t1,t2) < minimum(t2,t3), minimum(t2,t3) otherwise) 
 | 
| 
 | ||||||||||||||||
| minimum (i.e. t1 if t1<t2, t2 otherwise) 
 | 
| 
 | 
| normalize angles (in radians) to the range (-pi..pi] 
 Definition at line 110 of file Math. References base::Real. | 
| 
 | 
| normalize angles (in radians) to the range [0..2pi) 
 Definition at line 118 of file Math. References base::Real. | 
| 
 | ||||||||||||||||
| null-space of Matrix A (using Singular Value Decomposition - SVD) 
 
 
 | 
| 
 | ||||||||||||
| x raised to the power y 
 Definition at line 66 of file Math. References base::Real. | 
| 
 | 
| the Moore-Penrose pseudo-inverse of A (using SVD) 
 | 
| 
 | 
| convert radians to degrees 
 Definition at line 53 of file Math. References base::Real. | 
| 
 | 
| random number [0..1] 
 Definition at line 68 of file Math. References base::Real. | 
| 
 | 
| sign (i.e. -1 if n<0, 0 if n=0, 1 if n>0) 
 Definition at line 64 of file Math. References base::Real. | 
| 
 | 
| 
 Definition at line 76 of file Math. References base::Real. | 
| 
 | ||||||||||||||||||||
| Solve for Ax = b, given LUP decomposition of A as L, U and Pi, and given b, returns x. 
 | 
| 
 | 
| square (i.e. n*n) 
 Definition at line 56 of file Math. References base::Real. | 
| 
 | 
| squate root (i.e. n^.5) 
 Definition at line 58 of file Math. References Assert, and base::Real. | 
| 
 | 
| 
 Definition at line 78 of file Math. References base::Real. | 
| 
 | ||||||||||||
| 0 if in neighbourhood of 0 (i.e. 0 if |n| < neighbourhoodRadius, n otherwise) 
 Definition at line 90 of file Math. References base::Real. | 
 1.3.6
 
1.3.6