COIN-OR::LEMON - Graph Library

Changeset 158:4f54d89fa9d2 in lemon-0.x for src/work/bfs_iterator.hh


Ignore:
Timestamp:
03/08/04 13:29:07 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@223
Message:

a lot of interesting and very useful wrapper graphs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/bfs_iterator.hh

    r148 r158  
    624624
    625625
    626   template <typename GraphWrapper, typename OutEdgeIt,
     626  template <typename GraphWrapper, /*typename OutEdgeIt,*/
    627627            typename ReachedMap/*=typename GraphWrapper::NodeMap<bool>*/ >
    628628  class BfsIterator5 {
    629629    typedef typename GraphWrapper::NodeIt NodeIt;
     630    typedef typename GraphWrapper::OutEdgeIt OutEdgeIt;
    630631    GraphWrapper G;
    631632    std::queue<NodeIt> bfs_queue;
     
    641642      G(_G), reached(*(new ReachedMap(G /*, false*/))),
    642643      own_reached_map(true) { }
     644//     BfsIterator5(const typename GraphWrapper::BaseGraph& _G,
     645//               ReachedMap& _reached) :
     646//       G(_G), reached(_reached),
     647//       own_reached_map(false) { }
     648//     BfsIterator5(const typename GraphWrapper::BaseGraph& _G) :
     649//       G(_G), reached(*(new ReachedMap(G /*, false*/))),
     650//       own_reached_map(true) { }
    643651    ~BfsIterator5() { if (own_reached_map) delete &reached; }
    644652    void pushAndSetReached(NodeIt s) {
     
    661669      }
    662670    }
    663     BfsIterator5<GraphWrapper, OutEdgeIt, ReachedMap>&
     671    BfsIterator5<GraphWrapper, /*OutEdgeIt,*/ ReachedMap>&
    664672    operator++() {
    665673      if (G.valid(actual_edge)/*.valid()*/) {
     
    759767  };
    760768
    761   template <typename GraphWrapper, typename OutEdgeIt,
     769  template <typename GraphWrapper, /*typename OutEdgeIt,*/
    762770            typename ReachedMap/*=typename GraphWrapper::NodeMap<bool>*/ >
    763771  class DfsIterator5 {
    764772    typedef typename GraphWrapper::NodeIt NodeIt;
     773    typedef typename GraphWrapper::OutEdgeIt OutEdgeIt;
    765774    GraphWrapper G;
    766775    std::stack<OutEdgeIt> dfs_stack;
     
    783792      dfs_stack.push(G.template first<OutEdgeIt>(s));
    784793    }
    785     DfsIterator5<GraphWrapper, OutEdgeIt, ReachedMap>&
     794    DfsIterator5<GraphWrapper, /*OutEdgeIt,*/ ReachedMap>&
    786795    operator++() {
    787796      actual_edge=dfs_stack.top();
Note: See TracChangeset for help on using the changeset viewer.