Fix equalsIdentity() for rectangular matrices.

This commit is contained in:
Jitse Niesen 2011-03-10 13:49:06 +00:00
parent 5d1263e7c5
commit 151e3294cf

View File

@ -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);
}
}