35#ifndef STK_SYMINVERT_H
36#define STK_SYMINVERT_H
52template<
class Matrix,
int Size_>
55 typedef typename Matrix::Type
Type;
127 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0);
219 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0); inv(0,3) = inv(3,0);
220 inv(1,2) = inv(2,1); inv(1,3) = inv(3,1);
246 if (!decomp.
run())
return Type(0);
257template<
class Matrix,
int Size_>
260 typedef typename Matrix::Type
Type;
263 switch (
m.sizeRows())
274template<
class Matrix>
277 typedef typename Matrix::Type
Type;
282template<
class Matrix>
285 typedef typename Matrix::Type
Type;
290template<
class Matrix>
293 typedef typename Matrix::Type
Type;
298template<
class Matrix>
301 typedef typename Matrix::Type
Type;
In this file we define the SymEigen class (for a symmetric matrix).
In this file we define the enclosing class of the syevr lapck routine.
ArraySquare & ginv(ArraySquare &res) const
Compute the generalized inverse of the symmetric matrix and put the result in res.
virtual bool run()
Find the eigenvalues and eigenvectors of the matrix.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
static Type invertSymMatrix33(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 3x3 matrix m using only its lower part and store the result in i...
static Type invertSymMatrix44(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in i...
static Type invertSymMatrixXX(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in i...
static Type invertSymMatrix11(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric matrix m of size 1x1 and store the result in inv.
static Type invertSymMatrix22(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 2x2 matrix m using only its lower part and store the result in i...
The namespace STK is the main domain space of the Statistical ToolKit project.
Implementation of the computation of the inverse of a lower triangular matrix.
static Type run(Matrix const &m, CArraySquare< Type, 1 > &inv)
static Type run(Matrix const &m, CArraySquare< Type, 2 > &inv)
static Type run(Matrix const &m, CArraySquare< Type, 3 > &inv)
static Type run(Matrix const &m, CArraySquare< Type, 4 > &inv)
computing the inverse of a symmetric matrix.
static Type run(Matrix const &m, CArraySquare< Type, Size_ > &inv)