Fix index type for sparse index sorting.
diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp
index 43de50d..88cea09 100644
--- a/test/sparse_vector.cpp
+++ b/test/sparse_vector.cpp
@@ -15,6 +15,7 @@
double densityVec = (std::max)(8./(rows), 0.1);
typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;
typedef Matrix<Scalar,Dynamic,1> DenseVector;
+ typedef Matrix<DenseIndex,Dynamic,1> DenseIndexVector;
typedef SparseVector<Scalar,0,StorageIndex> SparseVectorType;
typedef SparseMatrix<Scalar,0,StorageIndex> SparseMatrixType;
Scalar eps = 1e-6;
@@ -148,7 +149,7 @@
{
SparseVectorType vec1(rows);
DenseVector refVec1 = DenseVector::Zero(rows);
- DenseVector innerIndices(rows);
+ DenseIndexVector innerIndices(rows);
innerIndices.setLinSpaced(0, rows - 1);
std::random_shuffle(innerIndices.begin(), innerIndices.end());
Index nz = internal::random<Index>(2, rows / 2);