mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix regression in changeset f05dea6b23
: computeFromHessenberg can take any expression for matrixQ, not only an HouseholderSequence.
This commit is contained in:
@@ -270,8 +270,13 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const EigenBase<InputType>
|
|||||||
// Step 1. Reduce to Hessenberg form
|
// Step 1. Reduce to Hessenberg form
|
||||||
m_hess.compute(matrix.derived()/scale);
|
m_hess.compute(matrix.derived()/scale);
|
||||||
|
|
||||||
// Step 2. Reduce to real Schur form
|
// Step 2. Reduce to real Schur form
|
||||||
computeFromHessenberg(m_hess.matrixH(), m_hess.matrixQ(), computeU);
|
// 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;
|
m_matT *= scale;
|
||||||
|
|
||||||
@@ -285,8 +290,8 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::computeFromHessenberg(const HessMa
|
|||||||
|
|
||||||
m_matT = matrixH;
|
m_matT = matrixH;
|
||||||
m_workspaceVector.resize(m_matT.cols());
|
m_workspaceVector.resize(m_matT.cols());
|
||||||
if(computeU)
|
if(computeU && !internal::is_same_dense(m_matU,matrixQ))
|
||||||
matrixQ.evalTo(m_matU, m_workspaceVector);
|
m_matU = matrixQ;
|
||||||
|
|
||||||
Index maxIters = m_maxIters;
|
Index maxIters = m_maxIters;
|
||||||
if (maxIters == -1)
|
if (maxIters == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user