On 12/1/05, Luis Quesada
Johan Oudinet wrote:
On 11/30/05, Luis Quesada
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).
I may be using the term "invalid" in the wrong way... What I mean, in the example attached, is that descriptor 3 is no longer associated to node D but to E after C's removal. In that sense 3 becomes an "invalid" descriptor of node D. I think this cannot be avoided even though clear_vertex is used.
No, this behavior is specific to vecS container whom vertex descriptors are int. But, if you use listS, setS, multisetS, etc.. vertex descriptors are void* and you can't describe them with an enum. Your example doesn't support remove_vertex. -- Johan