Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-07-26 04:41:06


On Tuesday 25 July 2006 12:46, Hidekazu Ikeno wrote:
> though, the condition 'j < size_' is satisfied in my code.
> I found that in hermitian_matrix_element class, the copy constructor
> doesn't intialize j_ (hermitian.hpp, line 63), and this caused the
> unexpected assertion error.

this is the patch

Index: hermitian.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/numeric/ublas/hermitian.hpp,v
retrieving revision 1.56
diff -u -p -r1.56 hermitian.hpp
--- hermitian.hpp 6 Nov 2005 14:57:13 -0000 1.56
+++ hermitian.hpp 26 Jul 2006 08:39:56 -0000
@@ -60,7 +60,7 @@ namespace boost { namespace numeric { na
             container_reference<matrix_type> (m), i_ (i), j_ (j), d_ (d), dirty_ (false) {}
         BOOST_UBLAS_INLINE
         hermitian_matrix_element (const hermitian_matrix_element &p):
- container_reference<matrix_type> (p), i_ (p.i_), d_ (p.d_), dirty_ (p.dirty_) {}
+ container_reference<matrix_type> (p), i_ (p.i_), j_ (p.j_), d_ (p.d_), dirty_ (p.dirty_) {}
         BOOST_UBLAS_INLINE
         ~hermitian_matrix_element () {
             if (dirty_)