|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-11-03 14:06:37
Am Freitag, 3. November 2006 18:52 schrieb Vassilis Virvilis:
> Is there any non obvious reason why this simple patch
> can't be applied in
> boost/numeric/ublas/vector_sparse.hpp ?
AFAIK there was simply no one who implemented it.
about your patch:
1st: you should also drop the line
BOOST_UBLAS_CHECK (!preserve, internal_logic ());
if the preserve logic is implemented.
2nd: If the new size is smaller than the old size, some (old) index
values may be too large and you should reduce filled_ such that
zero_based( index_data_[filled_-1] ) <= size;
(we should add this check to storage_invariants, too)
mfg
Gunter