Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-11-07 09:19:59


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).

mfg
Gunter