diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-06-06 10:17:28 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-06-06 10:17:28 +0200 |
commit | 421ece38e1995ec4df12213d6fd567fa18222cca (patch) | |
tree | 6966bc7910a6a91f6970e16532a50aab284b8c3e /test | |
parent | 7a61a564ef7d5403bcf3eef0c84252cc8bf73705 (diff) |
Sparse: fix long int as index type in simplicial cholesky and other decompositions
Diffstat (limited to 'test')
-rw-r--r-- | test/sparse.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sparse.h b/test/sparse.h index 530ae30bc..9944a2934 100644 --- a/test/sparse.h +++ b/test/sparse.h @@ -58,15 +58,15 @@ enum { * \param zeroCoords and nonzeroCoords allows to get the coordinate lists of the non zero, * and zero coefficients respectively. */ -template<typename Scalar,int Opt1,int Opt2> void +template<typename Scalar,int Opt1,int Opt2,typename Index> void initSparse(double density, Matrix<Scalar,Dynamic,Dynamic,Opt1>& refMat, - SparseMatrix<Scalar,Opt2>& sparseMat, + SparseMatrix<Scalar,Opt2,Index>& sparseMat, int flags = 0, std::vector<Vector2i>* zeroCoords = 0, std::vector<Vector2i>* nonzeroCoords = 0) { - enum { IsRowMajor = SparseMatrix<Scalar,Opt2>::IsRowMajor }; + enum { IsRowMajor = SparseMatrix<Scalar,Opt2,Index>::IsRowMajor }; sparseMat.setZero(); sparseMat.reserve(int(refMat.rows()*refMat.cols()*density)); @@ -108,15 +108,15 @@ initSparse(double density, sparseMat.finalize(); } -template<typename Scalar,int Opt1,int Opt2> void +template<typename Scalar,int Opt1,int Opt2,typename Index> void initSparse(double density, Matrix<Scalar,Dynamic,Dynamic, Opt1>& refMat, - DynamicSparseMatrix<Scalar, Opt2>& sparseMat, + DynamicSparseMatrix<Scalar, Opt2, Index>& sparseMat, int flags = 0, std::vector<Vector2i>* zeroCoords = 0, std::vector<Vector2i>* nonzeroCoords = 0) { - enum { IsRowMajor = DynamicSparseMatrix<Scalar,Opt2>::IsRowMajor }; + enum { IsRowMajor = DynamicSparseMatrix<Scalar,Opt2,Index>::IsRowMajor }; sparseMat.setZero(); sparseMat.reserve(int(refMat.rows()*refMat.cols()*density)); for(int j=0; j<sparseMat.outerSize(); j++) |