From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2004-07-19 13:05:56
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.
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.
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.
PS: And so that there is no misunderstanding:
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk