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? Björn Lindberg
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). yg-boost-users@m.gmane.org wrote:
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?
Björn Lindberg
*Yahoo! Groups Sponsor* ADVERTISEMENT http://rd.yahoo.com/M=246920.2960106.4328965.2848452/D=egroupweb/S=170500678...
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/.
Jeff Holle
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
participants (2)
-
Jeff Holle
-
yg-boost-users@m.gmane.org