aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/permutationmatrices.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-10-11 13:45:27 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-10-11 13:45:27 +0200
commitcd3c2451b6915dbd9e27930b1dcb4550a73d8e2e (patch)
treec26f9365ec61cfdd08bc87022eb45b1b39f69c69 /test/permutationmatrices.cpp
parent3172749f326b8b3a9cd0f813e94a62ff454aa4c1 (diff)
add a unit test for permutation applied to sparse objects
Diffstat (limited to 'test/permutationmatrices.cpp')
-rw-r--r--test/permutationmatrices.cpp17
1 files changed, 0 insertions, 17 deletions
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<typename PermutationVectorType>
-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<Index>(0, size-1);
- Index j;
- do j = internal::random<Index>(0, size-1); while(j==i);
- std::swap(v(i), v(j));
- }
-}
-
using namespace std;
template<typename MatrixType> void permutationmatrices(const MatrixType& m)
{