Make sure T(i+1,i)==0 when diagonalizing T(i:i+1,i:i+1)

This commit is contained in:
Gael Guennebaud 2016-06-11 14:41:36 +02:00
parent 65d33e5898
commit 83904a21c1

View File

@ -630,11 +630,11 @@ namespace Eigen {
internal::real_2x2_jacobi_svd(m_T, i, i+1, &j_left, &j_right);
// Apply resulting Jacobi rotations
m_T.applyOnTheLeft(i,i+1,j_left);
m_T.applyOnTheRight(i,i+1,j_right);
m_S.applyOnTheLeft(i,i+1,j_left);
m_S.applyOnTheRight(i,i+1,j_right);
m_T(i,i+1) = Scalar(0);
m_T.applyOnTheLeft(i,i+1,j_left);
m_T.applyOnTheRight(i,i+1,j_right);
m_T(i+1,i) = m_T(i,i+1) = Scalar(0);
if(m_computeQZ) {
m_Q.applyOnTheRight(i,i+1,j_left.transpose());