equal
deleted
inserted
replaced
324 /// \param _graph the graph the algorithm will run on. |
324 /// \param _graph the graph the algorithm will run on. |
325 /// \param _length the length map used by the algorithm. |
325 /// \param _length the length map used by the algorithm. |
326 BellmanFord(const Graph& _graph, const LengthMap& _length) : |
326 BellmanFord(const Graph& _graph, const LengthMap& _length) : |
327 graph(&_graph), length(&_length), |
327 graph(&_graph), length(&_length), |
328 _pred(0), local_pred(false), |
328 _pred(0), local_pred(false), |
329 _dist(0), local_dist(false) {} |
329 _dist(0), local_dist(false), _mask(0) {} |
330 |
330 |
331 ///Destructor. |
331 ///Destructor. |
332 ~BellmanFord() { |
332 ~BellmanFord() { |
333 if(local_pred) delete _pred; |
333 if(local_pred) delete _pred; |
334 if(local_dist) delete _dist; |
334 if(local_dist) delete _dist; |
335 delete _mask; |
335 if(_mask) delete _mask; |
336 } |
336 } |
337 |
337 |
338 /// \brief Sets the length map. |
338 /// \brief Sets the length map. |
339 /// |
339 /// |
340 /// Sets the length map. |
340 /// Sets the length map. |