Re: [Boost-bugs] [Boost C++ Libraries] #688: ublas: bug in mapped_vector_of_mapped_vector

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #688: ublas: bug in mapped_vector_of_mapped_vector
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-09-24 21:29:48


#688: ublas: bug in mapped_vector_of_mapped_vector
---------------------+------------------------------------------------------
  Reporter: troyer | Owner: guwi17
      Type: Bugs | Status: closed
 Milestone: | Component: uBLAS
   Version: None | Severity: Problem
Resolution: fixed | Keywords:
---------------------+------------------------------------------------------
Changes (by guwi17):

  * status: new => closed
  * resolution: None => fixed

Comment:

 patch commited to SVN. See thread "Serious bug in
 mapped_vector_of_mapped_vector" of uBLAS mailing list (from sept. 2006!)

 On Thursday 07 September 2006 14:04, Gunter Winkler wrote:
> On Sunday 23 July 2006 11:13, Matthias Troyer wrote:
> > There is a serious bug in the mapped_vector_of_mapped_vector spare
> > matrix type. Rows containing only zero elements are not treated
> > correctly in prod(). The following code should give a vector that
> > contains only 1 in the last element. Instead prod() gives a vector
> > containing 1 in each element. In debug mode this bug is found by the
>
> I could reproduce the bug. It is inside the vector_assign logic. The
> product is correctly computed, but the assignment fails. I will give
 more
> details shortly.

 I finally found the bug and (hopefully) fixed it. The patch and sample
 program
 is attached. Is someone using mapped_vector_of_mapped_vector in a larger
 program? I'd like to know if the changes have any unexpected side affect.

 I changed the behavior of the iterators: Even the outer iterators skip
 empty
 rows (or columns).

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/688#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC