[Lemon-user] Shortest Path Tree using Dijkstra's Algorithm

João Paulo Ventura ventura at profusion.mobi
Wed Nov 14 16:27:58 CET 2012


Hello,

According to the Dijkstra class API, the following code

Dijkstra<ListGraph, ListGraph::EdgeMap<double> > dijkstra(graph, length);
dijkstra.init();
dijkstra.addSource(u);
dijkstra.start();

will create the shortest path tree from the vertex u to all vertex V[G] of
the graph.

I need this tree and not the path to a single vertex v (as returned by
dijkstra.path(v)), but I haven't figure out how this is possible in the API.
So I have to iterate over all V[G] \ {u} and join all shortest paths?

Thank you :-)

-- 
Joao Paulo Fernandes Ventura
Computing Engineer at University of Campinas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20121114/40e9ffb9/attachment.html>


More information about the Lemon-user mailing list