Index: vector_sparse.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/ublas/vector_sparse.hpp,v retrieving revision 1.76 diff -u -r1.76 vector_sparse.hpp --- vector_sparse.hpp 4 Feb 2006 15:13:25 -0000 1.76 +++ vector_sparse.hpp 3 Nov 2006 17:36:13 -0000 @@ -868,13 +868,19 @@ public: BOOST_UBLAS_INLINE void resize (size_type size, bool preserve = true) { - // FIXME preserve unimplemented BOOST_UBLAS_CHECK (!preserve, internal_logic ()); - size_ = size; capacity_ = restrict_capacity (capacity_); - index_data_. resize (capacity_); - value_data_. resize (capacity_); - filled_ = 0; + size_ = size; + if (preserve) { + index_data_. resize (capacity_, size_type ()); + value_data_. resize (capacity_, value_type ()); + filled_ = (std::min) (capacity_, filled_); + } + else { + index_data_. resize (capacity_); + value_data_. resize (capacity_); + filled_ = 0; + } storage_invariants (); }