lemon/bellman_ford.h
changeset 2505 1bb471764ab8
parent 2408 467ca6d16556
child 2517 d9cfac072869
equal deleted inserted replaced
20:f15a84fc6670 21:9cca93cccab2
   430     /// calculates the at most \f$ k \f$ length path lengths.
   430     /// calculates the at most \f$ k \f$ length path lengths.
   431     ///
   431     ///
   432     /// \warning The paths with limited edge number cannot be retrieved
   432     /// \warning The paths with limited edge number cannot be retrieved
   433     /// easily with \ref path() or \ref predEdge() functions. If you
   433     /// easily with \ref path() or \ref predEdge() functions. If you
   434     /// need the shortest path and not just the distance you should store
   434     /// need the shortest path and not just the distance you should store
   435     /// after each iteration the \ref predEdgeMap() map and manually build
   435     /// after each iteration the \ref predMap() map and manually build
   436     /// the path.
   436     /// the path.
   437     ///
   437     ///
   438     /// \return %True when the algorithm have not found more shorter
   438     /// \return %True when the algorithm have not found more shorter
   439     /// paths.
   439     /// paths.
   440     bool processNextRound() {
   440     bool processNextRound() {
   543     /// most \c num edge.
   543     /// most \c num edge.
   544     ///
   544     ///
   545     /// \warning The paths with limited edge number cannot be retrieved
   545     /// \warning The paths with limited edge number cannot be retrieved
   546     /// easily with \ref path() or \ref predEdge() functions. If you
   546     /// easily with \ref path() or \ref predEdge() functions. If you
   547     /// need the shortest path and not just the distance you should store
   547     /// need the shortest path and not just the distance you should store
   548     /// after each iteration the \ref predEdgeMap() map and manually build
   548     /// after each iteration the \ref predMap() map and manually build
   549     /// the path.
   549     /// the path.
   550     ///
   550     ///
   551     /// The algorithm computes
   551     /// The algorithm computes
   552     /// - The predecessor edge from each node.
   552     /// - The predecessor edge from each node.
   553     /// - The limited distance of each node from the root(s).
   553     /// - The limited distance of each node from the root(s).
   949     }
   949     }
   950 
   950 
   951     /// \brief Runs BellmanFord algorithm from the given node.
   951     /// \brief Runs BellmanFord algorithm from the given node.
   952     ///
   952     ///
   953     /// Runs BellmanFord algorithm from the given node.
   953     /// Runs BellmanFord algorithm from the given node.
   954     /// \param source is the given source.
   954     /// \param src is the given source.
   955     void run(Node src) {
   955     void run(Node src) {
   956       Base::_source = src;
   956       Base::_source = src;
   957       run();
   957       run();
   958     }
   958     }
   959 
   959 
  1014     }
  1014     }
  1015     
  1015     
  1016     /// \brief Sets the source node, from which the BellmanFord algorithm runs.
  1016     /// \brief Sets the source node, from which the BellmanFord algorithm runs.
  1017     ///
  1017     ///
  1018     /// Sets the source node, from which the BellmanFord algorithm runs.
  1018     /// Sets the source node, from which the BellmanFord algorithm runs.
  1019     /// \param source is the source node.
  1019     /// \param src is the source node.
  1020     BellmanFordWizard<_Traits>& source(Node src) {
  1020     BellmanFordWizard<_Traits>& source(Node src) {
  1021       Base::_source = src;
  1021       Base::_source = src;
  1022       return *this;
  1022       return *this;
  1023     }
  1023     }
  1024     
  1024