diff options
author | Thomas Capricelli <orzel@freehackers.org> | 2009-11-16 04:20:13 +0100 |
---|---|---|
committer | Thomas Capricelli <orzel@freehackers.org> | 2009-11-16 04:20:13 +0100 |
commit | f7e73f1bf900346676e84a597a146b11dd7ac5dc (patch) | |
tree | c0f73fbd7a29409316816f83a7d0e8d2cef859bf | |
parent | 955cd7f88455a46c9c31a225a6a63a6a440e3415 (diff) |
don't be shy and test them all
-rw-r--r-- | test/permutationmatrices.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/permutationmatrices.cpp b/test/permutationmatrices.cpp index c0353bc71..13b01cd83 100644 --- a/test/permutationmatrices.cpp +++ b/test/permutationmatrices.cpp @@ -64,10 +64,9 @@ template<typename MatrixType> void permutationmatrices(const MatrixType& m) RightPermutationType rp(rv); MatrixType m_permuted = lp * m_original * rp; - int i = ei_random<int>(0, rows-1); - int j = ei_random<int>(0, cols-1); - - VERIFY_IS_APPROX(m_original(lv(i),j), m_permuted(i,rv(j))); + for (int i=0; i<rows; i++) + for (int j=0; j<cols; j++) + VERIFY_IS_APPROX(m_original(lv(i),j), m_permuted(i,rv(j))); Matrix<Scalar,Rows,Rows> lm(lp); Matrix<Scalar,Cols,Cols> rm(rp); |