LDLT isPositive incorrectly returns false for a positive semidefinite matrix
Submitted by Charles Collicutt
Assigned to Jitse Niesen
Link to original bugzilla bug (#736)
Version: 3.2
Description
Created attachment 419
Test case for LDLT::isPositive
According to the documentation for Eigen 3.2.0, LDLT::isPositive should return true if a matrix is positive semidefinite.
See: http://eigen.tuxfamily.org/dox/classEigen_1_1LDLT.html#a02588e810c938a215dfd59d933488ba3
However, it returns false on some positive definite matrices. There is an example attached to this bug report.
Given the matrix:
1 0 0
0 0 0
0 0 1
Both isPositive and isNegative return false. However, the eigenvalues are all non-negative and have no imaginary parts:
1 + 0i
0 + 0i
1 + 0i
So this is a positive semidefinite matrix. LDLT::isPositive should return true.
Attachment 419, "Test case for LDLT::isPositive":
psd_bug.cpp