lemon/bellman_ford.h
changeset 1130 0759d974de81
parent 1092 dceba191c00d
child 1131 4add05447ca0
     1.1 --- a/lemon/bellman_ford.h	Thu Apr 02 22:34:03 2015 +0200
     1.2 +++ b/lemon/bellman_ford.h	Sun Jan 05 22:24:56 2014 +0100
     1.3 @@ -29,6 +29,7 @@
     1.4  #include <lemon/error.h>
     1.5  #include <lemon/maps.h>
     1.6  #include <lemon/path.h>
     1.7 +#include <lemon/bits/stl_iterators.h>
     1.8  
     1.9  #include <limits>
    1.10  
    1.11 @@ -690,6 +691,21 @@
    1.12        int _index;
    1.13      };
    1.14  
    1.15 +    /// \brief Gets the collection of the active nodes.
    1.16 +    ///
    1.17 +    /// This function can be used for iterating on the active nodes of the
    1.18 +    /// Bellman-Ford algorithm after the last phase.
    1.19 +    /// These nodes should be checked in the next phase to
    1.20 +    /// find augmenting arcs outgoing from them.
    1.21 +    /// It returns a wrapped ActiveIt, which looks
    1.22 +    /// like an STL container (by having begin() and end())
    1.23 +    /// which you can use in range-based for loops, STL algorithms, etc.
    1.24 +    LemonRangeWrapper1<ActiveIt, BellmanFord>
    1.25 +        activeNodes(const BellmanFord& algorithm) const {
    1.26 +      return LemonRangeWrapper1<ActiveIt, BellmanFord>(algorithm);
    1.27 +    }
    1.28 +
    1.29 +
    1.30      /// \name Query Functions
    1.31      /// The result of the Bellman-Ford algorithm can be obtained using these
    1.32      /// functions.\n