Boost logo

Boost Users :

Subject: [Boost-users] BGL: Copying graphs and edge_descriptors confusion
From: David Doria (daviddoria_at_[hidden])
Date: 2011-06-27 13:25:58


I have a graph, 'inputGraph' with a bool in its bundled edge
properties. If I copy that graph with:

Graph g = inputGraph;

there seems to be some odd behavior with the edge_descriptors. If you
take a look at this example:

http://programmingexamples.net/index.php?title=CPP/Boost/BGL/CopyAGraph

I set one of the edges to visible=0 and then output all of the edge
visibilities using the iterator from boost::edges(g) - this works
properly, the edge that I set to visible=0 indeeds shows up as such.
However, if I instead use the iterator from boost::edges(inputGraph) ,
all of the edges appear as visible! Shouldn't the edge_descriptors be
identical since the graph g is an exact copy of inputGraph?

Can anyone explain why the last two loops in that example do not
produce the same output?

Thanks,

David


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