# HG changeset patch # User deba # Date 1171544783 0 # Node ID eb37b9774ef6d27af8ce49d6ca22c90d165fb532 # Parent f2ef1aa8189a2b5d2741d435ca77c5bd97a8655f Small changes diff -r f2ef1aa8189a -r eb37b9774ef6 lemon/bellman_ford.h --- a/lemon/bellman_ford.h Wed Feb 14 13:50:25 2007 +0000 +++ b/lemon/bellman_ford.h Thu Feb 15 13:06:23 2007 +0000 @@ -524,11 +524,11 @@ /// - The shortest path tree. /// - The distance of each node from the root(s). bool checkedStart() { - int num = countNodes(*graph); + int num = countNodes(*graph) - 1; for (int i = 0; i < num; ++i) { if (processNextWeakRound()) return true; } - return false; + return _process.empty(); } /// \brief Executes the algorithm with path length limit. @@ -584,16 +584,16 @@ /// - The shortest path tree. /// - The distance of each node from the root. /// - /// \note d.run(s, len) is just a shortcut of the following code. + /// \note d.run(s, num) is just a shortcut of the following code. ///\code /// d.init(); /// d.addSource(s); - /// d.limitedStart(len); + /// d.limitedStart(num); ///\endcode - void run(Node s, int len) { + void run(Node s, int num) { init(); addSource(s); - limitedStart(len); + limitedStart(num); } ///@} @@ -608,7 +608,7 @@ /// \brief Lemon iterator for get a active nodes. /// - /// Lemon iterator for get a active nodes. This class provides a + /// Lemon iterator for get the active nodes. This class provides a /// common style lemon iterator which gives back a subset of the /// nodes. The iterated nodes are active in the algorithm after /// the last phase so these should be checked in the next phase to