|
| Lapack_Cholesky () |
|
template<class P2 , class B2 > |
| Lapack_Cholesky (const Matrix< Size, Size, P2, B2 > &m) |
|
| Lapack_Cholesky (int size) |
| Constructor for Size=Dynamic. More...
|
|
template<class P2 , class B2 > |
void | compute (const Matrix< Size, Size, P2, B2 > &m) |
|
void | do_compute () |
|
int | rank () const |
|
template<int Size2, typename P2 , typename B2 > |
Vector< Size, Precision > | backsub (const Vector< Size2, P2, B2 > &v) const |
|
template<int Size2, int Cols2, typename P2 , typename B2 > |
Matrix< Size, Cols2, Precision, ColMajor > | backsub (const Matrix< Size2, Cols2, P2, B2 > &m) const |
|
template<int Size2, typename P2 , typename B2 > |
Precision | mahalanobis (const Vector< Size2, P2, B2 > &v) const |
|
Matrix< Size, Size, Precision > | get_L () const |
|
Precision | determinant () const |
|
Matrix | get_inverse () const |
|
template<int Size, typename Precision = DefaultPrecision>
class TooN::Lapack_Cholesky< Size, Precision >
Decomposes a positive-semidefinite symmetric matrix A (such as a covariance) into L*L^T, where L is lower-triangular. Also can compute A = S*S^T, with S lower triangular. The LDL^T form is faster to compute than the class Cholesky decomposition. The decomposition can be used to compute A^-1*x, A^-1*M, M*A^-1*M^T, and A^-1 itself, though the latter rarely needs to be explicitly represented. Also efficiently computes det(A) and rank(A). It can be used as follows:
Matrix<3> A = ...;
Matrix<2,3> M;
Matrix<2> B;
Vector<3> y = make_Vector(2,3,4);
Cholesky<3> chol(A);
x = cholA.backsub(y);
Matrix<3> Ainv = cholA.get_inverse();
Cholesky decomposition of a symmetric matrix. Only the lower half of the matrix is considered This uses the non-sqrt version of the decomposition giving symmetric M = L*D*L.T() where the diagonal of L contains ones
- Parameters
-
Size | the size of the matrix |
Precision | the precision of the entries in the matrix and its decomposition |
Definition at line 72 of file Lapack_Cholesky.h.