Fix LDLT with semi-definite complex matrices: owing to round-off errors, the diagonal was not real. Also exploit the fact that the diagonal is real in the rest of LDLT

This commit is contained in:
Gael Guennebaud
2014-07-08 10:04:27 +02:00
parent bbe9e22d60
commit 08b0c08e5e
2 changed files with 7 additions and 8 deletions

View File

@@ -213,7 +213,7 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
VERIFY_IS_APPROX(A * vecX, vecB);
}
// check matrices with wide spectrum
// check matrices with a wide spectrum
if(rows>=3)
{
RealScalar s = (std::min)(16,std::numeric_limits<RealScalar>::max_exponent10/8);