# HG changeset patch # User alpar # Date 1109978076 0 # Node ID 4bebc22ab77c2436f3836e6147fcbc061e69c1df # Parent 4d07dd56fa9a935f60e17f997ac1d23f6632a711 - Bugfix in setting the previous Node - Bugfix in DijkstraWizard _source member initialization diff -r 4d07dd56fa9a -r 4bebc22ab77c src/lemon/dijkstra.h --- a/src/lemon/dijkstra.h Fri Mar 04 23:12:10 2005 +0000 +++ b/src/lemon/dijkstra.h Fri Mar 04 23:14:36 2005 +0000 @@ -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) {} };