You can use Dijsktra::predArc(Node v) to get the tree. You have to iterate over the V[G] \ {u}, and get all predecessor arcs.<div><br></div><div>Balazs</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 14, 2012 at 4:27 PM, Joćo Paulo Ventura <span dir="ltr"><<a href="mailto:ventura@profusion.mobi" target="_blank">ventura@profusion.mobi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><br></div><div>According to the Dijkstra class API, the following code</div><div><br></div><div><div><font face="courier new, monospace">Dijkstra<ListGraph, ListGraph::EdgeMap<double> > dijkstra(graph, length);</font></div>
<div><font face="courier new, monospace">dijkstra.init();</font></div></div><div><font face="courier new, monospace">dijkstra.addSource(u);</font></div><div><font face="courier new, monospace">dijkstra.start();</font></div>
<div><br></div><div>will create the shortest path tree from the vertex <font face="courier new, monospace">u</font> to all vertex V[G] of the graph.</div><div><br></div><div>I need this tree and not the path to a single vertex <font face="courier new, monospace">v</font> (as returned by <font face="courier new, monospace">dijkstra.path(v)</font>), but I haven't figure out how this is possible in the API.</div>
<div>So I have to iterate over all V[G] \ {u} and join all shortest paths?</div><div><br></div><div>Thank you :-)<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div>Joao Paulo Fernandes Ventura</div>
<div>Computing Engineer at University of Campinas</div>
<br>
</font></span></div>
<br>_______________________________________________<br>
Lemon-user mailing list<br>
<a href="mailto:Lemon-user@lemon.cs.elte.hu">Lemon-user@lemon.cs.elte.hu</a><br>
<a href="http://lemon.cs.elte.hu/mailman/listinfo/lemon-user" target="_blank">http://lemon.cs.elte.hu/mailman/listinfo/lemon-user</a><br>
<br></blockquote></div><br></div>