COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/29/04 18:59:00 (17 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@639
Message:

corrections for leda matching files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/leda/bipartite_matching_leda.cc

    r459 r482  
    1919#include <graph_wrapper.h>
    2020#include <maps.h>
    21 #include <edmonds_karp.h>
    22 #include <preflow.h>
     21#include <max_flow.h>
    2322
    2423/**
     
    102101
    103102  Timer ts;
     103  stGW::EdgeMap<int> flow(stgw);
     104  MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
     105    max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, flow);
     106
    104107  ts.reset();
    105   stGW::EdgeMap<int> max_flow(stgw);
    106   MaxFlow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    107     max_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, max_flow);
     108  FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
    108109//  while (max_flow_test.augmentOnShortestPath()) { }
    109110  typedef ListGraph MutableGraph;
     
    114115  std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl;
    115116  std::cout << "elapsed time: " << ts << std::endl;
    116 //   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
    117 //     std::cout << e << ": " << max_flow[e] << "\n";
    118 //   }
    119 //   std::cout << "\n";
    120117
    121118  ts.reset();
    122   stGW::EdgeMap<int> pre_flow(stgw);
    123   Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    124     pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow/*, true*/);
    125   pre_flow_test.run();
     119  FOR_EACH_LOC(stGW::EdgeIt, e, stgw) flow.set(e, 0);
     120  max_flow_test.run();
    126121  std::cout << "pre flow value: " << max_flow_test.flowValue() << std::endl;
    127122  std::cout << "elapsed time: " << ts << std::endl;
    128 //   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
    129 //     std::cout << e << ": " << pre_flow[e] << "\n";
    130 //   }
    131 //   std::cout << "\n";
    132123
    133124  ts.reset(); 
    134125  leda_list<leda_edge> ml=MAX_CARD_BIPARTITE_MATCHING(lg);
    135   //  stGW::EdgeMap<int> pre_flow(stgw);
    136   //Preflow<stGW, int, ConstMap<stGW::Edge, int>, stGW::EdgeMap<int> >
    137   //  pre_flow_test(stgw, stgw.S_NODE, stgw.T_NODE, const1map, pre_flow, true);
    138   //pre_flow_test.run();
    139126  std::cout << "leda matching value: " << ml.size() << std::endl;
    140127  std::cout << "elapsed time: " << ts << std::endl;
    141 //   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
    142 //     std::cout << e << ": " << pre_flow[e] << "\n";
    143 //   }
    144 //   std::cout << "\n";
    145128
    146129  return 0;
Note: See TracChangeset for help on using the changeset viewer.