[Lemon-commits] [lemon_svn] deba: r2590 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:53:45 CET 2006
Author: deba
Date: Wed Mar 1 10:40:16 2006
New Revision: 2590
Modified:
hugo/trunk/lemon/dijkstra.h
Log:
Bug fix
Modified: hugo/trunk/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/lemon/dijkstra.h (original)
+++ hugo/trunk/lemon/dijkstra.h Wed Mar 1 10:40:16 2006
@@ -543,14 +543,14 @@
///The optional second parameter is the initial distance of the node.
///
///It checks if the node has already been added to the heap and
- ///It is pushed to the heap only if either it was not in the heap
- ///or the shortest path found till then is longer then \c dst.
+ ///it is pushed to the heap only if either it was not in the heap
+ ///or the shortest path found till then is shorter than \c dst.
void addSource(Node s,Value dst=dijkstraZero<Value>())
{
if(_heap->state(s) != Heap::IN_HEAP) {
_heap->push(s,dst);
} else if((*_heap)[s]<dst) {
- _heap->push(s,dst);
+ _heap->set(s,dst);
_pred->set(s,INVALID);
}
}
More information about the Lemon-commits
mailing list