#include <rtcVarSMat.h>
Public Member Functions | |
void | choleskyDecomp () |
void | choleskyDecomp (VarSMat< T > &r) |
void | choleskySolve (VarVec< T > &b) |
T | det () const |
VarVec< T > | getDiag () |
int | invert () |
VarSMat< T > | inverted () const |
void | luDecomp (VarVec< int > &indx, T *d=NULL) |
void | luSolve (const VarVec< int > &indx, VarVec< T > &b) |
VarSMat< T > | minorMat (const int ip, const int jp) const |
void | setDiag (const T a) |
void | setDiag (const VarVec< T > &diagVec) |
void | setIdentity () |
void | setSize (int size) |
int | size () const |
T | trace () const |
void | transpose () |
VarSMat () | |
VarSMat (int size) | |
VarSMat (int size, const T *d) | |
VarSMat (int size, const T diagVal) | |
VarSMat (int size, const VarVec< T > &diagVec) | |
VarSMat (const Array2< T > &m) | |
template<class U > | |
VarSMat (const VarMat< U > &m) |
A square matrix. A specialization of a general matrix that provides operations only possible on square matrices like guassian elimination and Cholesky decomposition.
Definition at line 43 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | ) | [inline] |
default Ctor
Definition at line 104 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | int | size | ) | [inline] |
Ctor that doesn't initialize anything.
Definition at line 109 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | int | size, |
const T * | d | ||
) | [inline] |
Ctor that initializes from an array.
size | is the number of rows/columns |
d | the (row major) data array of length r*r |
Definition at line 116 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | int | size, |
const T | diagVal | ||
) | [inline] |
Ctor that makes a multiple of the identity matrix.
size | is the number of rows/columns |
diagVal | the value to which all diagonal entries will be set |
Definition at line 123 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | int | size, |
const VarVec< T > & | diagVec | ||
) | [inline] |
Ctor that makes a (mostly) zero matrix with diagonal entries from vec.
size | is the number of rows/columns |
diagVec | the vector of values that should appear on the diagonal |
Definition at line 133 of file rtcVarSMat.h.
rtc::VarSMat< T >::VarSMat | ( | const Array2< T > & | m | ) | [inline] |
Ctor that initializes from a Mat<T,r,r>
Definition at line 141 of file rtcVarSMat.h.
Casting Ctor that initializes from a Mat<U,r,r>
Definition at line 148 of file rtcVarSMat.h.
void rtc::VarSMat< T >::choleskyDecomp | ( | ) | [inline] |
Perform the Cholesky Decomposition in place. Only the upper triangle (including the diagonal) is used as source data. The result is stored in the lower triangle (including the diagonal).
Definition at line 426 of file rtcVarSMat.h.
void rtc::VarSMat< T >::choleskyDecomp | ( | VarSMat< T > & | _r | ) | [inline] |
Perform the Cholesky Decomposition and stores the result in r.
Definition at line 454 of file rtcVarSMat.h.
void rtc::VarSMat< T >::choleskySolve | ( | VarVec< T > & | b | ) | [inline] |
Perform a Cholesky Decomposition backsolve with given RHS. Precondtion: choleskyDecomp() has already been called
b | the RHS vector in the equation A*x = b |
Definition at line 470 of file rtcVarSMat.h.
T rtc::VarSMat< T >::det | ( | ) | const [inline] |
Return the determinant of this matrix. This uses the LU decomposition. Matrices of size 3 and under have specialized implementations.
Definition at line 264 of file rtcVarSMat.h.
VarVec< T > rtc::VarSMat< T >::getDiag | ( | ) | [inline] |
Get the diagonal entries of the matrix.
Definition at line 203 of file rtcVarSMat.h.
int rtc::VarSMat< T >::invert | ( | ) | [inline] |
Return the inverse of this matrix This uses the LU decomposition
Definition at line 298 of file rtcVarSMat.h.
VarSMat< T > rtc::VarSMat< T >::inverted | ( | ) | const [inline] |
Return the inverse of this matrix This uses the LU decomposition
Definition at line 275 of file rtcVarSMat.h.
void rtc::VarSMat< T >::luDecomp | ( | VarVec< int > & | indx, |
T * | d = NULL |
||
) | [inline] |
Perform the LU Decomposition in place
Definition at line 326 of file rtcVarSMat.h.
void rtc::VarSMat< T >::luSolve | ( | const VarVec< int > & | indx, |
VarVec< T > & | b | ||
) | [inline] |
Perform a LU Decomposition backsolve with given RHS. Precondtion: luDecomp(indx,d) has already been called
indx | the row-swap vector returned from luDecomp() |
b | the RHS vector in the equation A*x = b |
Definition at line 395 of file rtcVarSMat.h.
VarSMat< T > rtc::VarSMat< T >::minorMat | ( | const int | ip, |
const int | jp | ||
) | const [inline] |
Return the minor of this matrix about element (ip,jp)
Definition at line 238 of file rtcVarSMat.h.
void rtc::VarSMat< T >::setDiag | ( | const T | diagVal | ) | [inline] |
Sets matrix to a multiple of the identity matrix.
diagVal | the value to which all diagonal entries will be set |
Definition at line 173 of file rtcVarSMat.h.
void rtc::VarSMat< T >::setDiag | ( | const VarVec< T > & | diagVec | ) | [inline] |
Sets the diagonal entries of matrix from a vector. without changing other entries.
diagVec | the vector of values that should appear on the diagonal |
Definition at line 183 of file rtcVarSMat.h.
void rtc::VarSMat< T >::setIdentity | ( | ) | [inline] |
Sets matrix to an identiy matrix, where the diagonal elements are equal to 1 and every other element equals 0.
Definition at line 164 of file rtcVarSMat.h.
void rtc::VarSMat< T >::setSize | ( | int | size | ) | [inline] |
Sets matrix to specific size
size | is the number of rows/columns |
Definition at line 156 of file rtcVarSMat.h.
int rtc::VarSMat< T >::size | ( | ) | const [inline] |
Reimplemented from rtc::Array< T, 2 >.
Definition at line 213 of file rtcVarSMat.h.
T rtc::VarSMat< T >::trace | ( | ) | const [inline] |
Return the trace of the matrix
Definition at line 222 of file rtcVarSMat.h.
void rtc::VarSMat< T >::transpose | ( | ) | [inline] |
Transposes this matrix in place, overwriting old data
Definition at line 231 of file rtcVarSMat.h.