Allow conservative resize in sparse matrix
Submitted by Benjamin Piwowarski
Assigned to Nobody
Link to original bugzilla bug (#449)
Description
In one of my class, I need to update a sparse matrix by adding new columns to a sparse matrix, but there is no conservative reside method for sparse matrices for the moment.
Implementing it would probably require at the same time
- to grow the OuterIndexPtrs
- to reserve space
so I would suggest to implement
conservativeResize(Index rows, Index cols, const SizesType &reserveSizes)
Some other methods could be built from this, like
conservativeResize(Index rows, Index cols, Index reserveSize) where the reserveSize is used when greater than the actual size
conservativeResize(Index rows, Index cols) where everything is kept as is (but OuterIndexPtrs)
Edited by Charles Schlosser