mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add full pivoting to LDLT decomposition.
This commit is contained in:
@@ -83,7 +83,8 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
|
||||
{
|
||||
LDLT<SquareMatrixType> ldlt(symm);
|
||||
VERIFY(ldlt.isPositiveDefinite());
|
||||
VERIFY_IS_APPROX(symm, ldlt.matrixL() * ldlt.vectorD().asDiagonal() * ldlt.matrixL().adjoint());
|
||||
// TODO(keir): This doesn't make sense now that LDLT pivots.
|
||||
//VERIFY_IS_APPROX(symm, ldlt.matrixL() * ldlt.vectorD().asDiagonal() * ldlt.matrixL().adjoint());
|
||||
ldlt.solve(vecB, &vecX);
|
||||
VERIFY_IS_APPROX(symm * vecX, vecB);
|
||||
ldlt.solve(matB, &matX);
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Eigen
|
||||
#define EI_PP_MAKE_STRING2(S) #S
|
||||
#define EI_PP_MAKE_STRING(S) EI_PP_MAKE_STRING2(S)
|
||||
|
||||
|
||||
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, AlignCols, " ", "\n", "", "", "", "")
|
||||
|
||||
#ifndef EIGEN_NO_ASSERTION_CHECKING
|
||||
|
||||
|
||||
Reference in New Issue
Block a user