Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL]Why the output of algorithms are vertex sequence(PredecessorMap)? How about parallel edges??
From: Louis Lavery (Louis_at_[hidden])
Date: 2009-05-08 11:59:12


Andrew Sutton wrote:
>
>
> The biggest reason for using descriptors is that they can
> provide a higher degree of stability than iterators. For
> example, a vector will invalidate all iterators on insert and
> remove.
>
> [skip]
>
> "Remove" also invalidates vertex descriptors!
>
>
> For VertexList == vecS, yes. My advice regarding this would be: If
> you're using vecS for vectors, don't remove vertices. If you have to
> remove vertices, use listS and never call num_vertices,
>
> For anything other than vecS, remove_vertex shouldn't invalidate
> descriptors other than the one removed. I hope.

Yes, and as I understand it, ditto iterators.
So the question still stands!

Louis.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net