mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
bug #479 : Adjust max iterations count wrt matrix size
This commit is contained in:
parent
7273feee92
commit
b4065b5598
@ -352,7 +352,7 @@ void ComplexSchur<MatrixType>::reduceToTriangularForm(bool computeU)
|
|||||||
|
|
||||||
// if we spent too many iterations on the current element, we give up
|
// if we spent too many iterations on the current element, we give up
|
||||||
iter++;
|
iter++;
|
||||||
if(iter > m_maxIterations) break;
|
if(iter > m_maxIterations * m_matT.cols()) break;
|
||||||
|
|
||||||
// find il, the top row of the active submatrix
|
// find il, the top row of the active submatrix
|
||||||
il = iu-1;
|
il = iu-1;
|
||||||
@ -382,7 +382,7 @@ void ComplexSchur<MatrixType>::reduceToTriangularForm(bool computeU)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iter <= m_maxIterations)
|
if(iter <= m_maxIterations * m_matT.cols())
|
||||||
m_info = Success;
|
m_info = Success;
|
||||||
else
|
else
|
||||||
m_info = NoConvergence;
|
m_info = NoConvergence;
|
||||||
|
@ -251,14 +251,14 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::compute(const MatrixType& matrix,
|
|||||||
Vector3s firstHouseholderVector(0,0,0), shiftInfo;
|
Vector3s firstHouseholderVector(0,0,0), shiftInfo;
|
||||||
computeShift(iu, iter, exshift, shiftInfo);
|
computeShift(iu, iter, exshift, shiftInfo);
|
||||||
iter = iter + 1;
|
iter = iter + 1;
|
||||||
if (iter > m_maxIterations) break;
|
if (iter > m_maxIterations * m_matT.cols()) break;
|
||||||
Index im;
|
Index im;
|
||||||
initFrancisQRStep(il, iu, shiftInfo, im, firstHouseholderVector);
|
initFrancisQRStep(il, iu, shiftInfo, im, firstHouseholderVector);
|
||||||
performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
|
performFrancisQRStep(il, im, iu, computeU, firstHouseholderVector, workspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(iter <= m_maxIterations)
|
if(iter <= m_maxIterations * m_matT.cols())
|
||||||
m_info = Success;
|
m_info = Success;
|
||||||
else
|
else
|
||||||
m_info = NoConvergence;
|
m_info = NoConvergence;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user