src/lemon/dijkstra.h
changeset 1196 4bebc22ab77c
parent 1193 c3585aec8cb3
child 1201 cb26a6250401
equal deleted inserted replaced
9:284f629198d0 10:ef0f49a4d0e0
   449   private:
   449   private:
   450     void finalizeNodeData(Node v,Value dst)
   450     void finalizeNodeData(Node v,Value dst)
   451     {
   451     {
   452       _reached->set(v,true);
   452       _reached->set(v,true);
   453       _dist->set(v, dst);
   453       _dist->set(v, dst);
   454       _predNode->set(v,G->source((*_pred)[v]));
   454       if((*_pred)[v]!=INVALID) _predNode->set(v,G->source((*_pred)[v])); ///\todo What to do?
   455     }
   455     }
   456 
   456 
   457   public:
   457   public:
   458     ///\name Excetution control
   458     ///\name Excetution control
   459     ///The simplest way to execute the algorithm is to use
   459     ///The simplest way to execute the algorithm is to use
   749     /// Constructor.
   749     /// Constructor.
   750     
   750     
   751     /// This constructor does not require parameters, therefore it initiates
   751     /// This constructor does not require parameters, therefore it initiates
   752     /// all of the attributes to default values (0, INVALID).
   752     /// all of the attributes to default values (0, INVALID).
   753     DijkstraWizardBase() : _g(0), _length(0), _pred(0), _predNode(0),
   753     DijkstraWizardBase() : _g(0), _length(0), _pred(0), _predNode(0),
   754 		       _dist(0), _source(INVALID) {}
   754 		       _dist(0), _source(0) {}
   755 
   755 
   756     /// Constructor.
   756     /// Constructor.
   757     
   757     
   758     /// This constructor requires some parameters,
   758     /// This constructor requires some parameters,
   759     /// listed in the parameters list.
   759     /// listed in the parameters list.
   761     /// \param g is the initial value of  \ref _g
   761     /// \param g is the initial value of  \ref _g
   762     /// \param l is the initial value of  \ref _length
   762     /// \param l is the initial value of  \ref _length
   763     /// \param s is the initial value of  \ref _source
   763     /// \param s is the initial value of  \ref _source
   764     DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
   764     DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
   765       _g((void *)&g), _length((void *)&l), _pred(0), _predNode(0),
   765       _g((void *)&g), _length((void *)&l), _pred(0), _predNode(0),
   766 		  _dist(0), _source((void *)&s) {}
   766 		  _dist(0), _source((s==INVALID)?0:(void *)&s) {}
   767 
   767 
   768   };
   768   };
   769   
   769   
   770   /// A class to make easier the usage of Dijkstra algorithm
   770   /// A class to make easier the usage of Dijkstra algorithm
   771 
   771