[Lemon-user] Removing a node while executing dijkstra.
Alpár Jüttner
alpar at cs.elte.hu
Tue Dec 21 12:48:57 CET 2010
Hi,
The attached patch implements this feature. Any feedback is welcome.
Regards,
Alpar
On Mon, 2010-12-20 at 12:25 +0100, Maarten Bovijn wrote:
> Hi everyone,
>
> I've got a question concerning the dijkstra algorithm.
> I was wondering if it's possible to prune a node while executing the
> algorithm.
> An example makes it more clear.
>
> Dijkstra<ListDigraph> dijkstra(graph, mylengthmap);
> dijkstra.init();
> dijkstra.addSource(a);
> while (!dijkstra.emptyQueue()) {
> ListDigraph::Node x = dijkstra.nextNode();
> if (!condition) {
> remove x from the queue;
> } else {
> dijkstra.processNextNode();
> }
> }
>
> The problem is that I don't know how to prune the node.
>
> Ty,
> Maarten
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dij-skip-next-node.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20101221/f615e7ae/attachment.patch>
More information about the Lemon-user
mailing list