diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-03-10 13:49:06 +0000 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-03-10 13:49:06 +0000 |
commit | 151e3294cfa29ff1485ce7ad1310d15098b55e9e (patch) | |
tree | 8b11aebb8fb2938682da7afc5b546ba3d3a82d92 /test | |
parent | 5d1263e7c546ad6dcf6490fed8e6b57355b77a2d (diff) |
Fix equalsIdentity() for rectangular matrices.
Diffstat (limited to 'test')
-rw-r--r-- | test/nullary.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp index dd42cb898..3a46e10c7 100644 --- a/test/nullary.cpp +++ b/test/nullary.cpp @@ -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); } } |