mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-09 07:00:27 +08:00
Matrix square root can process 0 eigenvalue.
This commit is contained in:
parent
b9fc9d8f32
commit
b9543ce237
@ -94,7 +94,7 @@ void MatrixSquareRootQuasiTriangular<MatrixType>::computeDiagonalPartOfSqrt(Matr
|
||||
const Index size = m_A.rows();
|
||||
for (Index i = 0; i < size; i++) {
|
||||
if (i == size - 1 || T.coeff(i+1, i) == 0) {
|
||||
eigen_assert(T(i,i) > 0);
|
||||
eigen_assert(T(i,i) >= 0);
|
||||
sqrtT.coeffRef(i,i) = sqrt(T.coeff(i,i));
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user