3 #include <vnl/vnl_matrix.h> 4 #include <vnl/vnl_diag_matrix.h> 5 #include <vnl/vnl_vector.h> 7 #include "AnimaOptimizersExport.h" 28 m_InputMatrix.set_size(matrixDimension, matrixDimension);
29 m_InputMatrix.fill(0.0);
30 m_InputMatrix.fill_diagonal(epsilon);
31 m_MatrixSize = matrixDimension;
32 m_LMatrix.set_size(matrixDimension, matrixDimension);
33 m_LMatrix.set_identity();
34 m_DMatrix.set_size(matrixDimension);
35 m_DMatrix.fill_diagonal(epsilon);
40 this->SetInputMatrix(val);
44 void PerformDecomposition();
50 VectorType &SolveLinearSystem(
const VectorType &b);
53 void SolveLinearSystemInPlace(VectorType &b);
56 void Update(
const VectorType &x);
59 void SetInputMatrix(
const MatrixType &matrix);
62 double GetConditionNumber();
67 void SetLMatrix(
const MatrixType &val) {m_LMatrix = val;}
69 void SetDMatrix(
const DiagonalType &val) {m_DMatrix = val;}
73 MatrixType m_InputMatrix, m_LMatrix;
74 DiagonalType m_DMatrix;
75 unsigned int m_MatrixSize;
77 VectorType m_ProblemSolution;
78 VectorType m_WorkVector;
void SetLMatrix(const MatrixType &val)
CholeskyDecomposition(const MatrixType &val)
vnl_vector< double > VectorType
MatrixType & GetInputMatrix()
Get input matrix, useful if decomposition updated through rank one method.
MatrixType & GetLMatrix()
vnl_diag_matrix< double > DiagonalType
void SetDMatrix(const DiagonalType &val)
CholeskyDecomposition(const unsigned int matrixDimension, const double epsilon)
DiagonalType & GetDMatrix()
vnl_matrix< double > MatrixType
Cholesky decomposition: decomposes a symmetric matrix A in the form L D L^T, where L is lower triangu...