You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Is there a way to get the cycle 2 vertex mapping.
I can get cycles in terms of edge_numb but this is numbered with relation to the spanning tree. I was wondering if there is a simple way to print cycle_1: vertex_i, vertex_j, .. vertex_i ?
Thanks again for your time!!!!
raghav
The text was updated successfully, but these errors were encountered:
You should change method print_cycle_basis in file GW_MCB_DEMO.c. Class edge_num contains method operator()(int i) which can be used to get the actual LEDA edge. From the LEDA edge you can access both source and target vertices. Something like the following should work:
int j = 0;
forall(j, cycle) {
e = enumb(j);
source = g.source(e);
target = g.target(e);
}
or
leda::list_item it = cycle.first();
while( it != nil ) {
index = cycle.index( it );
e = enumb( index );
source = g.source(e);
target = g.target(e);
it = cycle.succ( it );
}
Hi
Is there a way to get the cycle 2 vertex mapping.
I can get cycles in terms of edge_numb but this is numbered with relation to the spanning tree. I was wondering if there is a simple way to print cycle_1: vertex_i, vertex_j, .. vertex_i ?
Thanks again for your time!!!!
raghav
The text was updated successfully, but these errors were encountered: