diff -r 39b6e65574c6 -r 0759d974de81 lemon/bellman_ford.h --- a/lemon/bellman_ford.h Thu Apr 02 22:34:03 2015 +0200 +++ b/lemon/bellman_ford.h Sun Jan 05 22:24:56 2014 +0100 @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -690,6 +691,21 @@ int _index; }; + /// \brief Gets the collection of the active nodes. + /// + /// This function can be used for iterating on the active nodes of the + /// Bellman-Ford algorithm after the last phase. + /// These nodes should be checked in the next phase to + /// find augmenting arcs outgoing from them. + /// It returns a wrapped ActiveIt, which looks + /// like an STL container (by having begin() and end()) + /// which you can use in range-based for loops, STL algorithms, etc. + LemonRangeWrapper1 + activeNodes(const BellmanFord& algorithm) const { + return LemonRangeWrapper1(algorithm); + } + + /// \name Query Functions /// The result of the Bellman-Ford algorithm can be obtained using these /// functions.\n