Sparse module: add a more flexible SparseMatrix::fillrand() function

which allows to fill a matrix with random inner coordinates (makes sense
only when a very few coeffs are inserted per col/row)
This commit is contained in:
Gael Guennebaud
2008-12-11 18:26:24 +00:00
parent beabf008b0
commit 5015e48361
4 changed files with 68 additions and 5 deletions

View File

@@ -138,8 +138,8 @@ struct ei_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>
// make sure to call innerSize/outerSize since we fake the storage order.
int rows = lhs.innerSize();
int cols = rhs.outerSize();
int size = lhs.outerSize();
ei_assert(size == rhs.innerSize());
//int size = lhs.outerSize();
ei_assert(lhs.outerSize() == rhs.innerSize());
// allocate a temporary buffer
AmbiVector<Scalar> tempVector(rows);