bug #1479: fix failure detection in LDLT

This commit is contained in:
Gael Guennebaud
2017-11-16 17:55:24 +01:00
parent 95ecb2b5d6
commit 672bdc126b
2 changed files with 19 additions and 0 deletions

View File

@@ -375,6 +375,8 @@ template<> struct ldlt_inplace<Lower>
if((rs>0) && pivot_is_valid)
A21 /= realAkk;
else if(rs>0)
ret = ret && (A21.array()==Scalar(0)).all();
if(found_zero_pivot && pivot_is_valid) ret = false; // factorization failed
else if(!pivot_is_valid) found_zero_pivot = true;