diff --git a/test/sparse_vector.cpp b/test/sparse_vector.cpp index 43de50d81..88cea0948 100644 --- a/test/sparse_vector.cpp +++ b/test/sparse_vector.cpp @@ -15,6 +15,7 @@ template void sparse_vector(int rows, int double densityVec = (std::max)(8./(rows), 0.1); typedef Matrix DenseMatrix; typedef Matrix DenseVector; + typedef Matrix DenseIndexVector; typedef SparseVector SparseVectorType; typedef SparseMatrix SparseMatrixType; Scalar eps = 1e-6; @@ -148,7 +149,7 @@ template void sparse_vector(int rows, int { 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(2, rows / 2);