Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Can't copy_graph the simplest graph with bundled properties
From: Alberto Santini (santini.alberto_at_[hidden])
Date: 2015-12-03 07:06:07


On Wednesday, 2 December 2015 03:10:34 UTC+1, Paolo Bolzoni wrote:
>
> I am afraid you have to give a custom edge and vertex copier.
>

My bundled properties are so trivial that I shouldn't be supposed to
provide a copier (hopefully!).
I figured out that if I just provide a vertex_index_map, the copy succeeds.
I am not sure if the following is correct, but it gives the correct output:

http://coliru.stacked-crooked.com/a/d1355b0800503892

It would be interesting to know if copy_graph(old_graph, new_graph) is any
different from new_graph = old_graph. In the first case I needed the
property map, in the second I don't. But is the second version correct?
(I'm not even sure the first version is).

I pledge that, if I manage to understand all these mechanisms right one
day, I'll volunteer for the improvement of the BGL documentation (to make
it more user-friendly!). :-)

AS



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