[Lemon-user] Removing a node while executing dijkstra.

Maarten Bovijn maarten.bovijn at gmail.com
Mon Dec 20 12:25:46 CET 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20101220/da8ad9c7/attachment.html>


More information about the Lemon-user mailing list