Boost logo

Boost Users :

From: Jeremy Graham Siek (jsiek_at_[hidden])
Date: 2005-03-15 08:57:11


Hi Yariv,

On Mar 15, 2005, at 6:44 AM, Yariv Tal wrote:
> Even worse: as far as I undertand if I use listS then
> vertex_desfcriptor is
> no longer an index an no renumbering occurs in remove_vertex!

Sure, but you don't want renumbering, do you? And if you do, then
you can do the renumbering yourself.

> So, unless I
> want to commit to using vecS and to a specific implementation I need
> to
> somehow KNOW whether or not to perform renumbering.
> I coulld do this via a traits template with sepcialization for each
> vertices
> container type, but it seems to me that the library should have (and
> probably has) a better way of abstracting this, no?

Yes, vertex indices and renumbering are a trouble-spot for
adjacency list and could use improvement.

> Perhaps the problem is that I'm storing vertex_descriptors in the
> ObjVertexMap, which may be defined as transient entities that (like
> iterators after an erase) might be invalidated after a remove_vertex -
> but
> then, how can I hold some persistent and efficient identifier into the
> graph
> that remains valid after remove_vertex?

It sounds like you need to use listS and manage the vertex indices
yourself.

Cheers,
Jeremy

_______________________________________________
Jeremy Siek <jsiek_at_[hidden]>
http://www.osl.iu.edu/~jsiek
Ph.D. Candidate, Indiana University Bloomington
C++ Booster (http://www.boost.org)
_______________________________________________


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