[Lemon-commits] [lemon_svn] alpar: r1608 - hugo/trunk/src/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:46:32 CET 2006


Author: alpar
Date: Sat Mar  5 00:14:36 2005
New Revision: 1608

Modified:
   hugo/trunk/src/lemon/dijkstra.h

Log:
- Bugfix in setting the previous Node
- Bugfix in DijkstraWizard _source member initialization


Modified: hugo/trunk/src/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/src/lemon/dijkstra.h	(original)
+++ hugo/trunk/src/lemon/dijkstra.h	Sat Mar  5 00:14:36 2005
@@ -451,7 +451,7 @@
     {
       _reached->set(v,true);
       _dist->set(v, dst);
-      _predNode->set(v,G->source((*_pred)[v]));
+      if((*_pred)[v]!=INVALID) _predNode->set(v,G->source((*_pred)[v])); ///\todo What to do?
     }
 
   public:
@@ -751,7 +751,7 @@
     /// This constructor does not require parameters, therefore it initiates
     /// all of the attributes to default values (0, INVALID).
     DijkstraWizardBase() : _g(0), _length(0), _pred(0), _predNode(0),
-		       _dist(0), _source(INVALID) {}
+		       _dist(0), _source(0) {}
 
     /// Constructor.
     
@@ -763,7 +763,7 @@
     /// \param s is the initial value of  \ref _source
     DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
       _g((void *)&g), _length((void *)&l), _pred(0), _predNode(0),
-		  _dist(0), _source((void *)&s) {}
+		  _dist(0), _source((s==INVALID)?0:(void *)&s) {}
 
   };
   



More information about the Lemon-commits mailing list