diff options
author | 2010-03-20 17:04:40 +0000 | |
---|---|---|
committer | 2010-03-20 17:04:40 +0000 | |
commit | d91ffffc378fe1d7cefd668ea010dfbbbe7967e5 (patch) | |
tree | f5eaee47ece147ea57499d0d89ce764eef83a49c /Eigen/src/Eigenvalues/ComplexSchur.h | |
parent | d3e271c47e373146345f411900772d0d2627b0ea (diff) |
Allow ComplexEigenSolver and ComplexSchur to work with real matrices.
Add a test which covers this case.
Diffstat (limited to 'Eigen/src/Eigenvalues/ComplexSchur.h')
-rw-r--r-- | Eigen/src/Eigenvalues/ComplexSchur.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Eigenvalues/ComplexSchur.h b/Eigen/src/Eigenvalues/ComplexSchur.h index 366114d5e..7b20a6621 100644 --- a/Eigen/src/Eigenvalues/ComplexSchur.h +++ b/Eigen/src/Eigenvalues/ComplexSchur.h @@ -158,8 +158,8 @@ void ComplexSchur<MatrixType>::compute(const MatrixType& matrix, bool skipU) // TODO skip Q if skipU = true HessenbergDecomposition<MatrixType> hess(matrix); - m_matT = hess.matrixH(); - if(!skipU) m_matU = hess.matrixQ(); + m_matT = hess.matrixH().template cast<Complex>(); + if(!skipU) m_matU = hess.matrixQ().template cast<Complex>(); // Reduce the Hessenberg matrix m_matT to triangular form by QR iteration. @@ -221,7 +221,7 @@ void ComplexSchur<MatrixType>::compute(const MatrixType& matrix, bool skipU) // compute the shift kappa as one of the eigenvalues of the 2x2 // diagonal block on the bottom of the active submatrix - Matrix<Scalar,2,2> t = m_matT.template block<2,2>(iu-1,iu-1); + Matrix<Complex,2,2> t = m_matT.template block<2,2>(iu-1,iu-1); sf = t.cwiseAbs().sum(); t /= sf; // the normalization by sf is to avoid under/overflow |