From 60325b83309df5061fb9230af4d7edb59d0eaf1b Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 23 Feb 2010 16:10:26 -0500 Subject: [PATCH] actually, this is not even meant to be a termination criterion. so the proper fix is this. --- Eigen/src/Cholesky/LDLT.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index 708b02375..7c8e1eb04 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -240,14 +240,10 @@ LDLT& LDLT::compute(const MatrixType& a) m_matrix.row(j).tail(endSize) = m_matrix.row(j).tail(endSize).conjugate() - _temporary.tail(endSize).transpose(); - // Finish early if the matrix is not full rank. - if(ei_abs(Djj) < cutoff) + if(ei_abs(Djj) > cutoff) { - for(int i = j; i < size; i++) m_transpositions.coeffRef(i) = i; - break; + m_matrix.col(j).tail(endSize) = m_matrix.row(j).tail(endSize) / Djj; } - - m_matrix.col(j).tail(endSize) = m_matrix.row(j).tail(endSize) / Djj; } }