From d1b54ecfa3cd9c57569ab245566a4f66cc4f363a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 30 Nov 2011 19:24:43 +0100 Subject: add more support for uncompressed mode --- test/sparse.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/sparse.h') diff --git a/test/sparse.h b/test/sparse.h index 4ca6b5aed..1ce1d2ac4 100644 --- a/test/sparse.h +++ b/test/sparse.h @@ -78,11 +78,12 @@ initSparse(double density, { enum { IsRowMajor = SparseMatrix::IsRowMajor }; sparseMat.setZero(); - sparseMat.reserve(int(refMat.rows()*refMat.cols()*density)); + //sparseMat.reserve(int(refMat.rows()*refMat.cols()*density)); + sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), (1.5*density)*(IsRowMajor?refMat.cols():refMat.rows()))); for(int j=0; jpush_back(Vector2i(ai,aj)); } @@ -115,7 +117,7 @@ initSparse(double density, refMat(ai,aj) = v; } } - sparseMat.finalize(); + //sparseMat.finalize(); } template void -- cgit v1.2.3