Index: matrix_sparse.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/ublas/matrix_sparse.hpp,v retrieving revision 1.56 diff -u -r1.56 matrix_sparse.hpp --- matrix_sparse.hpp 31 Jan 2005 15:14:24 -0000 1.56 +++ matrix_sparse.hpp 15 Mar 2005 11:19:24 -0000 @@ -2479,7 +2479,7 @@ typedef typename IA::value_type size_type; // size_type for the data arrays. typedef typename IA::size_type array_size_type; - // FIXME difference type for sprase storage iterators should it be in the container? + // FIXME difference type for sparse storage iterators should it be in the container? typedef typename IA::difference_type difference_type; typedef T value_type; typedef const T &const_reference; @@ -2598,6 +2598,13 @@ value_array_type &value_data () { return value_data_; } + BOOST_UBLAS_INLINE + void complete_index1_data () const { + while (filled1_ <= size1_) { + const_cast(this)->index1_data_ [filled1_] = k_based (filled2_); + ++ const_cast(this)->filled1_; + } + } // Resizing private: Index: operation.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/ublas/operation.hpp,v retrieving revision 1.15 diff -u -r1.15 operation.hpp --- operation.hpp 4 Jan 2005 14:51:16 -0000 1.15 +++ operation.hpp 15 Mar 2005 11:19:24 -0000 @@ -38,7 +38,7 @@ typedef typename V::size_type size_type; typedef typename V::value_type value_type; - for (size_type i = 0; i < e1.size1 (); ++ i) { + for (size_type i = 0; i < e1.filled1 () - 1; ++ i) { size_type begin = e1.index1_data () [i]; size_type end = e1.index1_data () [i + 1]; value_type t (v (i)); @@ -57,7 +57,7 @@ V &v, column_major_tag) { typedef typename V::size_type size_type; - for (size_type j = 0; j < e1.size2 (); ++ j) { + for (size_type j = 0; j < e1.filled1 () - 1; ++ j) { size_type begin = e1.index1_data () [j]; size_type end = e1.index1_data () [j + 1]; for (size_type i = begin; i < end; ++ i)