How to use vertex mapping parameter in copy_graph
Hello! I want to create a straight line drawing of a planar graph that is not maximal planar. So I want to follow the instructions in http://www.boost.org/doc/libs/1_55_0/libs/graph/doc/straight_line_drawing.ht... : "If you want to draw a graph g, you can create a copy g' of g, store a mapping m of vertices in g' to vertices in g, triangulate g', and then send g' in as the input to chrobak_payne_straight_line_drawing. The drawing returned can then be applied to g using m to translate vertices from one graph to another." But I'm stuck at the point where I need to make a copy of the graph and store the vertex-to-vertex mapping between the two graphs. I'm not good enough at C++ to understand from the documentation at http://www.boost.org/doc/libs/1_55_0/libs/graph/doc/copy_graph.html how to provide or access the last parameter orig_to_copy(Orig2CopyMap c) If someone could fill in the missing code in this function, I would be most thankful! void doSomething(MyGraph_t& g){ MyGraph_t g_copy; copy_graph(g, g_copy, [...???...]); // here I would like to access the Orig2CopyMap which stores the mapping }
participants (1)
-
Christoph Czurda