Boost logo

Boost Users :

Subject: [Boost-users] How to use vertex mapping parameter in copy_graph
From: Christoph Czurda (hasnoadditives_at_[hidden])
Date: 2014-06-19 18:05:05


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

"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 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

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at