don't be shy and test them all

This commit is contained in:
Thomas Capricelli 2009-11-16 04:20:13 +01:00
parent 955cd7f884
commit f7e73f1bf9

View File

@ -64,9 +64,8 @@ template<typename MatrixType> void permutationmatrices(const MatrixType& m)
RightPermutationType rp(rv); RightPermutationType rp(rv);
MatrixType m_permuted = lp * m_original * rp; MatrixType m_permuted = lp * m_original * rp;
int i = ei_random<int>(0, rows-1); for (int i=0; i<rows; i++)
int j = ei_random<int>(0, cols-1); for (int j=0; j<cols; j++)
VERIFY_IS_APPROX(m_original(lv(i),j), m_permuted(i,rv(j))); VERIFY_IS_APPROX(m_original(lv(i),j), m_permuted(i,rv(j)));
Matrix<Scalar,Rows,Rows> lm(lp); Matrix<Scalar,Rows,Rows> lm(lp);