COIN-OR::LEMON - Graph Library

Changeset 1336:0759d974de81 in lemon for lemon/bellman_ford.h


Ignore:
Timestamp:
01/05/14 22:24:56 (7 years ago)
Author:
Gabor Gevay <ggab90@…>
Branch:
default
Phase:
public
Message:

STL style iterators (#325)

For

  • graph types,
  • graph adaptors,
  • paths,
  • iterable maps,
  • LP rows/cols and
  • active nodes is BellmanFord?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bellman_ford.h

    r1270 r1336  
    3030#include <lemon/maps.h>
    3131#include <lemon/path.h>
     32#include <lemon/bits/stl_iterators.h>
    3233
    3334#include <limits>
     
    690691      int _index;
    691692    };
     693
     694    /// \brief Gets the collection of the active nodes.
     695    ///
     696    /// This function can be used for iterating on the active nodes of the
     697    /// Bellman-Ford algorithm after the last phase.
     698    /// These nodes should be checked in the next phase to
     699    /// find augmenting arcs outgoing from them.
     700    /// It returns a wrapped ActiveIt, which looks
     701    /// like an STL container (by having begin() and end())
     702    /// which you can use in range-based for loops, STL algorithms, etc.
     703    LemonRangeWrapper1<ActiveIt, BellmanFord>
     704        activeNodes(const BellmanFord& algorithm) const {
     705      return LemonRangeWrapper1<ActiveIt, BellmanFord>(algorithm);
     706    }
     707
    692708
    693709    /// \name Query Functions
Note: See TracChangeset for help on using the changeset viewer.