mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-20 11:56:17 +08:00
fix bug #478: RealSchur failed on a zero matrix.
This commit is contained in:
parent
c8346abcdd
commit
b96b429aa2
@ -239,6 +239,8 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const MatrixType& matrix,
|
|||||||
Scalar exshift(0); // sum of exceptional shifts
|
Scalar exshift(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);
|
||||||
@ -270,7 +272,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;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user