From cd3c2451b6915dbd9e27930b1dcb4550a73d8e2e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 11 Oct 2011 13:45:27 +0200 Subject: add a unit test for permutation applied to sparse objects --- test/permutationmatrices.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'test/permutationmatrices.cpp') diff --git a/test/permutationmatrices.cpp b/test/permutationmatrices.cpp index d0fa01310..308838c70 100644 --- a/test/permutationmatrices.cpp +++ b/test/permutationmatrices.cpp @@ -24,23 +24,6 @@ #include "main.h" -template -void randomPermutationVector(PermutationVectorType& v, typename PermutationVectorType::Index size) -{ - typedef typename PermutationVectorType::Index Index; - typedef typename PermutationVectorType::Scalar Scalar; - v.resize(size); - for(Index i = 0; i < size; ++i) v(i) = Scalar(i); - if(size == 1) return; - for(Index n = 0; n < 3 * size; ++n) - { - Index i = internal::random(0, size-1); - Index j; - do j = internal::random(0, size-1); while(j==i); - std::swap(v(i), v(j)); - } -} - using namespace std; template void permutationmatrices(const MatrixType& m) { -- cgit v1.2.3