mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-20 21:33:14 +08:00
RealSchur: improve speed of computeNormOfT
This commit is contained in:
parent
4e60e2cdf6
commit
cfb76b242f
@ -300,7 +300,7 @@ inline typename MatrixType::Scalar RealSchur<MatrixType>::computeNormOfT()
|
|||||||
// + m_matT.bottomLeftCorner(size-1,size-1).diagonal().cwiseAbs().sum();
|
// + m_matT.bottomLeftCorner(size-1,size-1).diagonal().cwiseAbs().sum();
|
||||||
Scalar norm(0);
|
Scalar norm(0);
|
||||||
for (Index j = 0; j < size; ++j)
|
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;
|
return norm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user