fix #51 (bad use of std::complex::real)

This commit is contained in:
Gael Guennebaud
2009-09-02 15:18:11 +02:00
parent b83654b5d0
commit 7586f7f706
3 changed files with 46 additions and 47 deletions

View File

@@ -107,7 +107,7 @@ void ComplexEigenSolver<MatrixType>::compute(const MatrixType& matrix)
m_eivec.coeffRef(i,k) -= (schur.matrixT().row(i).segment(i+1,k-i-1) * m_eivec.col(k).segment(i+1,k-i-1)).value();
z = schur.matrixT().coeff(i,i) - d2;
if(z==Scalar(0))
z.real() = eps * norm;
ei_real_ref(z) = eps * norm;
m_eivec.coeffRef(i,k) = m_eivec.coeff(i,k) / z;
}