COIN-OR::LEMON - Graph Library

Changeset 279:be43902fadb7 in lemon-0.x for src/work/edmonds_karp.h


Ignore:
Timestamp:
04/03/04 16:22:33 (17 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@393
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/edmonds_karp.h

    r269 r279  
    353353      FilterResGW filter_res_graph(res_graph, dist);
    354354      typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph);
    355       for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) {
    356         res_graph_to_F.set(n, F.addNode());
     355      {
     356        typename ResGW::NodeIt n;
     357        for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) {
     358          res_graph_to_F.set(n, F.addNode());
     359        }
    357360      }
    358361
     
    364367      //Making F to the graph containing the edges of the residual graph
    365368      //which are in some shortest paths
    366       for(typename FilterResGW::EdgeIt e=filter_res_graph.template first<typename FilterResGW::EdgeIt>(); filter_res_graph.valid(e); filter_res_graph.next(e)) {
    367         //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
     369      {
     370        typename FilterResGW::EdgeIt e;
     371        for(filter_res_graph.first(e); filter_res_graph.valid(e); filter_res_graph.next(e)) {
     372          //if (dist.get(res_graph.head(e))==dist.get(res_graph.tail(e))+1) {
    368373          typename MG::Edge f=F.addEdge(res_graph_to_F.get(res_graph.tail(e)), res_graph_to_F.get(res_graph.head(e)));
    369374          original_edge.update();
     
    372377          residual_capacity.set(f, res_graph.resCap(e));
    373378          //}
     379        }
    374380      }
    375381
     
    447453      MG F;
    448454      typename ResGW::NodeMap<typename MG::Node> res_graph_to_F(res_graph);
    449       for(typename ResGW::NodeIt n=res_graph.template first<typename ResGW::NodeIt>(); res_graph.valid(n); res_graph.next(n)) {
    450         res_graph_to_F.set(n, F.addNode());
     455      {
     456        typename ResGW::NodeIt n;
     457        for(res_graph.first(n); res_graph.valid(n); res_graph.next(n)) {
     458          res_graph_to_F.set(n, F.addNode());
     459        }
    451460      }
    452461
Note: See TracChangeset for help on using the changeset viewer.