35#ifndef STK_UPPERSYMINVERT_H
36#define STK_UPPERSYMINVERT_H
52template<
class Matrix,
int Size_>
55 typedef typename Matrix::Type
Type;
93 inv(1, 0) = inv(0, 1);
127 inv(1, 0) = inv(0, 1); inv(2, 0) = inv(0, 2); inv(2, 1) = inv(1, 2);
218 inv(1, 0) = inv(0, 1); inv(2, 0) = inv(0, 2); inv(3, 0) = inv(0, 3);
219 inv(2, 1) = inv(1, 2); inv(3, 1) = inv(1, 3);
220 inv(3, 2) = inv(2, 3);
245 if (!decomp.
run())
return Type(0);
256template<
class Matrix,
int Size_>
259 typedef typename Matrix::Type
Type;
262 switch (
m.sizeRows())
273template<
class Matrix>
276 typedef typename Matrix::Type
Type;
281template<
class Matrix>
284 typedef typename Matrix::Type
Type;
289template<
class Matrix>
292 typedef typename Matrix::Type
Type;
297template<
class Matrix>
300 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 invertUpperSymMatrix22(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 2x2 matrix m using only its upper part and store the result in i...
static Type invertUpperSymMatrix44(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in i...
static Type invertUpperSymMatrix11(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 invertUpperSymMatrixXX(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in i...
static Type invertUpperSymMatrix33(Matrix const &m, CArraySquare< Type, Size_ > &inv)
compute the inverse of the symmetric 3x3 matrix m using only its upper part and store the result in i...
The namespace STK is the main domain space of the Statistical ToolKit project.
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)
Implementation of the inversion matrix method for upper symmetric matrices.