mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Fix equalsIdentity() for rectangular matrices.
This commit is contained in:
parent
5d1263e7c5
commit
151e3294cf
@ -37,7 +37,7 @@ bool equalsIdentity(const MatrixType& A)
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < A.rows(); ++i) {
|
||||
for (int j = 0; j < i; ++j) {
|
||||
for (int j = 0; j < std::min(i, A.cols()); ++j) {
|
||||
offDiagOK = offDiagOK && (A(i,j) == zero);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user