bugfix in CholeskyWithoutSquareRoot::solve found by Timothy Hunter

This commit is contained in:
Gael Guennebaud
2008-08-16 07:09:39 +00:00
parent d9d69de382
commit 5546e963c9
3 changed files with 11 additions and 7 deletions

View File

@@ -149,10 +149,9 @@ typename Derived::Eval CholeskyWithoutSquareRoot<MatrixType>::solve(const Matrix
return m_matrix.adjoint().template part<UnitUpper>()
.solveTriangular(
(matrixL()
.solveTriangular(b))
.cwise()/m_matrix.diagonal()
);
( m_matrix.cwise().inverse().diagonal().asDiagonal()
* matrixL().solveTriangular(b))
);
}
/** \cholesky_module