27 Jun
2011
27 Jun
'11
5:49 p.m.
On Mon, 27 Jun 2011, David Doria wrote:
I can't explain to you why you observe this unexpected behavior, but there is also the copy_graph() function in the BGL which might perhaps suit your needs?
Good to know, but that didn't change anything. I changed
Graph g = inputGraph;
to
Graph g; boost::copy_graph(inputGraph, g);
and the output was identical.
Any other thoughts?
Iterators are not preserved among copies of an object; they aren't in STL either. You need to use iterators from the same graph that you are trying to access with them. Note that this is also true for vertex and edge descriptors for some graph types (listS is the most common). -- Jeremiah Willcock