Fwd: Reg, Boost lib dijkstra_shortest_paths for ECMP paths
Hi Team,
I came across the boost lib to identify the shortest paths in an
network using vertex/edge properties, and have
using dijkstra_shortest_paths method with predecessor_map concept with that
able to get the shortest path in the graph.
Have a requirement like to know about multiple shortest paths also if
present, for example below find the below network diagram with 4 edges,
A ------- B
| |
| |
D ------- C
Edges -> (A,B), (A,D), (B,C), (C,D) with equal distance 1.
With the predecessor_map as of now able to get path as A->B->C so that the
parent of C is noted as B.
In this example we have ECMP(equal cost multiple path) from src A to
destination C, tried to search for existing lib to achieve fetching all the
paths but unfortunately unable to identify the way.
kindly guide how to get such kind of multiple path info with the existing
library itself or not. If there exists how to get those info.
*<code snip>*
const int num_nodes = 4;
enum nodes { A, B, C, D};
Edge edge_array[] = { Edge(A, B), Edge(B, C), Edge(A, D), Edge(C,D)
};
int weights[] = { 1, 1, 1,1 };
int num_arcs = sizeof(edge_array) / sizeof(Edge);
graph_traits
participants (1)
-
kathireswaran thanuskodi