[Lemon-commits] deba: r3161 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Feb 12 11:25:56 CET 2007


Author: deba
Date: Mon Feb 12 11:25:56 2007
New Revision: 3161

Modified:
   hugo/trunk/lemon/dijkstra.h

Log:
Dijkstra could return the temporarly distance of the current node




Modified: hugo/trunk/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/lemon/dijkstra.h	(original)
+++ hugo/trunk/lemon/dijkstra.h	Mon Feb 12 11:25:56 2007
@@ -739,6 +739,13 @@
     ///of this funcion is undefined.
     Value dist(Node v) const { return (*_dist)[v]; }
 
+    ///The current distance of a node from the root.
+
+    ///Returns the current distance of a node from the root.
+    ///It may be decreased in the following processes.
+    ///\pre \c node should be reached but not processed
+    Value currentDist(Node v) const { return (*_heap)[v]; }
+
     ///Returns the 'previous edge' of the shortest path tree.
 
     ///For a node \c v it returns the 'previous edge' of the shortest path tree,



More information about the Lemon-commits mailing list