|
Boost Users : |
Subject: Re: [Boost-users] Getting undirected graph from directed graph discarding properties
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-10-10 09:15:20
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
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