mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
committed by
Rasmus Munk Larsen
parent
976f15ebca
commit
fe973ab0c5
@@ -277,7 +277,8 @@ typename ComplexSchur<MatrixType>::ComplexScalar ComplexSchur<MatrixType>::compu
|
|||||||
using std::abs;
|
using std::abs;
|
||||||
if ((iter == 10 || iter == 20) && iu > 1) {
|
if ((iter == 10 || iter == 20) && iu > 1) {
|
||||||
// exceptional shift, taken from http://www.netlib.org/eispack/comqr.f
|
// exceptional shift, taken from http://www.netlib.org/eispack/comqr.f
|
||||||
return abs(numext::real(m_matT.coeff(iu, iu - 1))) + abs(numext::real(m_matT.coeff(iu - 1, iu - 2)));
|
return ComplexSchur<MatrixType>::ComplexScalar(
|
||||||
|
abs(numext::real(m_matT.coeff(iu, iu - 1))) + abs(numext::real(m_matT.coeff(iu - 1, iu - 2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute the shift as one of the eigenvalues of t, the 2x2
|
// compute the shift as one of the eigenvalues of t, the 2x2
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ MatrixType MatrixFunctionAtomic<MatrixType>::compute(const MatrixType& A) {
|
|||||||
for (Index i = 0; i < rows; i++)
|
for (Index i = 0; i < rows; i++)
|
||||||
mx = (std::max)(mx, std::abs(m_f(Ashifted(i, i) + avgEival, static_cast<int>(s + r))));
|
mx = (std::max)(mx, std::abs(m_f(Ashifted(i, i) + avgEival, static_cast<int>(s + r))));
|
||||||
if (r != 0) rfactorial *= RealScalar(r);
|
if (r != 0) rfactorial *= RealScalar(r);
|
||||||
delta = (std::max)(delta, mx / rfactorial);
|
delta = (std::max)(delta, RealScalar(mx / rfactorial));
|
||||||
}
|
}
|
||||||
const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
|
const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
|
||||||
if (mu * delta * P_norm < NumTraits<Scalar>::epsilon() * F_norm) // series converged
|
if (mu * delta * P_norm < NumTraits<Scalar>::epsilon() * F_norm) // series converged
|
||||||
|
|||||||
Reference in New Issue
Block a user