Fix regression in changeset f05dea6b23

: computeFromHessenberg can take any expression for matrixQ, not only an HouseholderSequence.
This commit is contained in:
Gael Guennebaud 2018-07-02 12:18:25 +02:00
parent d625564936
commit 047677a08d

View File

@ -270,8 +270,13 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const EigenBase<InputType>
// Step 1. Reduce to Hessenberg form
m_hess.compute(matrix.derived()/scale);
// Step 2. Reduce to real Schur form
computeFromHessenberg(m_hess.matrixH(), m_hess.matrixQ(), computeU);
// Step 2. Reduce to real Schur form
// Note: we copy m_hess.matrixQ() into m_matU here and not in computeFromHessenberg
// to be able to pass our working-space buffer for the Householder to Dense evaluation.
m_workspaceVector.resize(matrix.cols());
if(computeU)
m_hess.matrixQ().evalTo(m_matU, m_workspaceVector);
computeFromHessenberg(m_hess.matrixH(), m_matU, computeU);
m_matT *= scale;
@ -285,8 +290,8 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::computeFromHessenberg(const HessMa
m_matT = matrixH;
m_workspaceVector.resize(m_matT.cols());
if(computeU)
matrixQ.evalTo(m_matU, m_workspaceVector);
if(computeU && !internal::is_same_dense(m_matU,matrixQ))
m_matU = matrixQ;
Index maxIters = m_maxIters;
if (maxIters == -1)