diff options
author | 2012-07-26 18:04:58 +0200 | |
---|---|---|
committer | 2012-07-26 18:04:58 +0200 | |
commit | cfb76b242f9c0ab8c471d825a772ed0e30782ac0 (patch) | |
tree | 4fbf7778969f01b85e66a69c1ebae72ecf1416b4 /Eigen/src/Eigenvalues/RealSchur.h | |
parent | 4e60e2cdf64fb1f255850abc7686f807b4ae06ab (diff) |
RealSchur: improve speed of computeNormOfT
Diffstat (limited to 'Eigen/src/Eigenvalues/RealSchur.h')
-rw-r--r-- | Eigen/src/Eigenvalues/RealSchur.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Eigenvalues/RealSchur.h b/Eigen/src/Eigenvalues/RealSchur.h index da877dd04..4cdfb17c2 100644 --- a/Eigen/src/Eigenvalues/RealSchur.h +++ b/Eigen/src/Eigenvalues/RealSchur.h @@ -300,7 +300,7 @@ inline typename MatrixType::Scalar RealSchur<MatrixType>::computeNormOfT() // + m_matT.bottomLeftCorner(size-1,size-1).diagonal().cwiseAbs().sum(); Scalar norm(0); for (Index j = 0; j < size; ++j) - norm += m_matT.row(j).segment((std::max)(j-1,Index(0)), size-(std::max)(j-1,Index(0))).cwiseAbs().sum(); + norm += m_matT.col(j).segment(0, (std::min)(size,j+2)).cwiseAbs().sum(); return norm; } |