COIN-OR::LEMON - Graph Library

Changeset 91:81bf58164f60 in lemon-0.x


Ignore:
Timestamp:
02/17/04 13:27:49 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@118
Message:

.

Location:
src/work/alpar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/f_ed_ka.h

    r80 r91  
    1717                                      FlowMap &f,
    1818                                      CapacityMap &c,
    19                                       typename Graph::NodeIt s,
    20                                       typename Graph::NodeIt t)
     19                                      typename Graph::EachNodeIt s,
     20                                      typename Graph::EachNodeIt t)
    2121  {
    22     typedef typename Graph::NodeIt NodeIt;
     22    typedef typename Graph::EachNodeIt EachNodeIt;
    2323    typedef typename Graph::EdgeIt EdgeIt;
    2424    typedef typename Graph::EachEdgeIt EachEdgeIt;
     
    3333      f.set(e,0);
    3434   
    35     std::queue<NodeIt> bfs_queue;
     35    std::queue<EachNodeIt> bfs_queue;
    3636    typename Graph::NodeMap<int> visited(G); //0: unvisited,
    3737                                             //1: reached by a forward edge
     
    4040    typename Graph::NodeMap<EdgeIt> tree(G);
    4141   
    42     NodeIt gn;  //FIXME: it might be too global for some people...
     42    EachNodeIt gn;  //FIXME: it might be too global for some people...
    4343   
    4444  augment:
    4545   
    46     for(NodeIt n(G);G.valid(n);G.next(n))
     46    for(EachNodeIt n(G);G.valid(n);G.next(n))
    4747      visited.set(n,0);
    4848   
     
    5656    while(!bfs_queue.empty() && !visited.get(t))
    5757      {
    58         NodeIt n(bfs_queue.front());
     58        EachNodeIt n(bfs_queue.front());
    5959        for(OutEdgeIt e(G,n);G.valid(e);G.next(e))
    6060          if(f.get(e)<c.get(e) &&   //FIXME: <
  • src/work/alpar/f_ed_ka_demo.cc

    r74 r91  
    1313
    1414int main(int, char **) {
    15   typedef ListGraph::NodeIt NodeIt;
     15  typedef ListGraph::EachNodeIt EachNodeIt;
    1616  typedef ListGraph::EachEdgeIt EachEdgeIt;
    1717
    1818  ListGraph G;
    19   NodeIt s, t;
     19  EachNodeIt s, t;
    2020  ListGraph::EdgeMap<int> cap(G);
    2121  readDimacsMaxFlow(std::cin, G, s, t, cap);
Note: See TracChangeset for help on using the changeset viewer.