Index: ublas/matrix_sparse.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/ublas/matrix_sparse.hpp,v retrieving revision 1.66 diff -u -p -r1.66 matrix_sparse.hpp --- ublas/matrix_sparse.hpp 1 Jul 2005 20:08:56 -0000 1.66 +++ ublas/matrix_sparse.hpp 4 Jul 2005 08:09:42 -0000 @@ -3920,9 +3939,13 @@ namespace boost { namespace numeric { na } BOOST_UBLAS_INLINE void set_filled (const array_size_type &filled) { + // Make sure that storage_invariants() succeeds + if (sorted_ && filled < filled_) + sorted_filled_ = filled; + else + sorted_ = (sorted_filled_ == filled); filled_ = filled; storage_invariants (); - return filled_; } BOOST_UBLAS_INLINE index_array_type &index1_data () { @@ -4070,7 +4115,7 @@ namespace boost { namespace numeric { na } storage_invariants (); } - + // Zeroing BOOST_UBLAS_INLINE void clear () { @@ -4186,8 +4231,8 @@ namespace boost { namespace numeric { na std::inplace_merge (ita.begin (), iunsorted, ita.end ()); // sum duplicates with += and remove - size_type filled = 0; - for (size_type i = 1; i < filled_; ++ i) { + array_size_type filled = 0; + for (array_size_type i = 1; i < filled_; ++ i) { if (index1_data_ [filled] != index1_data_ [i] || index2_data_ [filled] != index2_data_ [i]) { ++ filled; Index: ublas/operation.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/ublas/operation.hpp,v retrieving revision 1.21 diff -u -p -r1.21 operation.hpp --- ublas/operation.hpp 1 Jul 2005 20:08:50 -0000 1.21 +++ ublas/operation.hpp 4 Jul 2005 08:09:42 -0000 @@ -328,7 +328,7 @@ namespace boost { namespace numeric { na typedef typename L2::orientation_category orientation_category; if (init) - v.assign (zero_vector (e2 ().size2 ())); + v.assign (zero_vector (e2.size2 ())); #if BOOST_UBLAS_TYPE_CHECK vector cv (v); typedef typename type_traits::real_type real_type; @@ -348,7 +348,7 @@ namespace boost { namespace numeric { na const compressed_matrix &e2) { typedef V vector_type; - vector_type v (e2 ().size2 ()); + vector_type v (e2.size2 ()); // FIXME needed for c_matrix?! // return axpy_prod (e1, e2, v, false); return axpy_prod (e1, e2, v, true);