On Thu, 11 Oct 2012, Philipp Klaus Krause wrote:
On 10.10.2012 22:15, Jeremiah Willcock wrote:
On Wed, 10 Oct 2012, Philipp Klaus Krause wrote:
I have a directed graph that has some properties, and I want the underlying undirected graph, but don't need the properties there. Assuming G is the directed graph with properties, and G_sym is the undirected without them, up until boost 1.50 I used:
boost::copy_graph(G, G_sym);
But as of boost 1.51 and 1.52 this gives an error due to the properties. Is there an easy way to do what I want to do in boost, and if yes, how?
Pass a vertex_copy function that does nothing to copy_graph; see the copy_graph documentation for details, but basically you just want a binary function that takes anything, returns void, and is empty.
-- Jeremiah Willcock
My attempt at doing so
template
struct forget_about_the_properties { typedef typename boost::graph_traits ::vertex_descriptor G_desc; typedef typename boost::graph_traits ::vertex_descriptor G2_desc; void operator()(G_desc, G2_desc) const { } };
It looks like you are not calling the three-parameter version of copy_graph in other places in your code, leading to the first two groups of errors. You will also probably need a dummy edge property copy function in addition to the one for vertex properties; I see errors in your list that suggest that as well. -- Jeremiah Willcock