Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-07-19 13:43:33


On Monday 19 July 2004 1:05 pm, Guillaume Melquiond wrote:
> Now I think I have a correct solution. And I finally understood what the
> original code was doing; it would have been correct if there was an
> additional line in the adjacency triangular matrix. Indeed the iterator
> didn't try to stop on the first element outside the matrix but on the
> first line outside the matrix.

Oh, that makes sense.

> So the patch I now submit transforms the edge iterator so that the end
> iterator doesn't go so far but stop at the end of the matrix. It
> involves a special casing in the increment of the iterator so that it
> doesn't try to reach far outside the matrix.

Looks good.

> In the middle of the patch also lies my correction for the const-ness
> problem of the get_edge function I was explaining in the previous mail.

This looks fine, too.

Thanks! Check it in whatever you'd like.

> PPS: As a side note, I think the iterator could be made smaller by
> removing the m_inc variable and replacing it by m_targ since they are
> equivalent on the second half of the road and m_inc is not used on the
> first half. But it is a story for another time.

Another time, yes. I'd like to hold off on this type of change until after
1.32.0 is out there.

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk