Update vertex ordering in the boost graph VecS container according to graph indices to layout it as per my desired ordering.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Update vertex ordering in the boost graph VecS container according to graph indices to layout it as per my desired ordering.

mayur_narkhede
This post has NOT been accepted by the mailing list yet.
I am working on circular layout, I need a mechanism to pass vertices of a graph in some particular order (for edge crossovers minimization) to circle graph layout. But there is no parameter in circle graph layout definition which accepts the vertex ordering.
Is there any way I could do that? Or how shall I change the vertex sequence of a boost graph so that circle graph layout will automatically plot the vertices in desired sequence ?

I am working on clustered graph using boost subgraph.

Consider a graph with 4 vertices and 4 edges.
If we apply boost circle_graph_layout on this graph it gives layout and so I would like to pass the vertex sequence 0,2,1,3 to boost circle_graph_layout function in order to get expected output.  if my earlier vertex sequence is 0,1,2,3. And we change the sequence to 0,2,1,3 the edge crossover is removed.

boost circle_graph_layout has following definition:

template<typename VertexListGraph, typename PositionMap, typename Radius>
void circle_graph_layout(const VertexListGraph& g, PositionMap position,
Radius radius)
{..}

There is no room to pass vertex sequence in which we want to lay out the vertices.
So could you please help with some ways to achieve the expected layout?

Is there any other alternative to this?