diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-02-15 09:35:23 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-02-15 09:35:23 +0100 |
commit | 4b6b3f310f5b651d82a65eb546e61d70c09407c5 (patch) | |
tree | 4d0631070b5b0bf08f0da8d18f0033b0c06e98d8 /test/sparse.h | |
parent | cd606bbc943c4862cf0cf596d3ef97aae32c2887 (diff) |
Fix a few Index to int buggy conversions
Diffstat (limited to 'test/sparse.h')
-rw-r--r-- | test/sparse.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sparse.h b/test/sparse.h index a09c65e5f..433d48ec4 100644 --- a/test/sparse.h +++ b/test/sparse.h @@ -154,16 +154,16 @@ initSparse(double density, sparseMat.finalize(); } -template<typename Scalar> void +template<typename Scalar,int Options,typename Index> void initSparse(double density, Matrix<Scalar,Dynamic,1>& refVec, - SparseVector<Scalar>& sparseVec, + SparseVector<Scalar,Options,Index>& sparseVec, std::vector<int>* zeroCoords = 0, std::vector<int>* nonzeroCoords = 0) { sparseVec.reserve(int(refVec.size()*density)); sparseVec.setZero(); - for(int i=0; i<refVec.size(); i++) + for(Index i=0; i<refVec.size(); i++) { Scalar v = (internal::random<double>(0,1) < density) ? internal::random<Scalar>() : Scalar(0); if (v!=Scalar(0)) |