mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix bug #478: RealSchur failed on a zero matrix.
(transplanted from b96b429aa2
)
This commit is contained in:
@@ -238,6 +238,8 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const MatrixType& matrix,
|
|||||||
Scalar exshift = 0.0; // sum of exceptional shifts
|
Scalar exshift = 0.0; // sum of exceptional shifts
|
||||||
Scalar norm = computeNormOfT();
|
Scalar norm = computeNormOfT();
|
||||||
|
|
||||||
|
if(norm!=0)
|
||||||
|
{
|
||||||
while (iu >= 0)
|
while (iu >= 0)
|
||||||
{
|
{
|
||||||
Index il = findSmallSubdiagEntry(iu, norm);
|
Index il = findSmallSubdiagEntry(iu, norm);
|
||||||
@@ -269,6 +271,7 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const MatrixType& matrix,
|
|||||||
performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
|
performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(iter <= m_maxIterations)
|
if(iter <= m_maxIterations)
|
||||||
m_info = Success;
|
m_info = Success;
|
||||||
|
|||||||
Reference in New Issue
Block a user