Boost logo

Boost Users :

From: Johan Oudinet (johan.oudinet_at_[hidden])
Date: 2005-12-01 05:08:03


On 11/30/05, Luis Quesada <luque_at_[hidden]> wrote:
>
> In fact, what I want to do is to check whether an edge belongs to a
> graph in a context where descriptors get invalidated after vertex removals?

You must avoid invalidated descriptors !
Before removing a vertex u, you have to remove all out_edges from u
and in_edges to u.
use: clear_vertex(u, g) before remove_vertex(u, g).

>
>
> Then I remove some vertices. Now I want to check whether edge <A,B> is
> still there. Calling edge(A,B,g) would not be OK because the descriptors
> are no longer referring to the same vertices....

Yes, after removing some vertices without their edges, you have an
undefined behavior.

--
Johan

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