Boost logo

Boost Users :

From: yg-boost-users_at_[hidden]
Date: 2003-02-22 12:15:45


Jeff Holle <jeff.holle_at_[hidden]> writes:

> > I have a graph which might change during it's lifetime. I want to
> > attach external properties to this graph. Now, it seems like that in
> > order to be able to attach external properties, I need to have an
> > internal property with edge indices, ie that enumerates the
> > edges. These indices need to be continuous as I gather, since they are
> > used to index for instance a vector of num_edges() elements. Does this
> > mean that I have to re-enumerate all edges if I remove one? This seems
> > to me very cumbersome and also time consuming if the graph is large
> > and changes a lot. Is there another way?
>
> Utilize an map (map_hash if available, or map if not) for your external
> property container. This way a key is needed instead of an index (which
> would have the problems you indicated).

Ah, that is a good idea. Do you wrap this map in a property_map or do
you just maintain it completely "outside" the BGL paradigm? Which is
easiest?

Björn Lindberg


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