COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/05/04 18:52:46 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@421
Message:

konvergalunk, konvergalunk...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/edmonds_karp_demo.cc

    r271 r303  
    44
    55#include <list_graph.h>
    6 #include <smart_graph.h>
     6//#include <smart_graph.h>
    77#include <dimacs.h>
    88#include <edmonds_karp.h>
    99#include <time_measure.h>
    10 #include <graph_wrapper.h>
     10//#include <graph_wrapper.h>
    1111
    1212class CM {
     
    9191
    9292  {
    93     typedef TrivGraphWrapper<const Graph> GW;
    94     GW gw(G);
    9593    std::cout << "edmonds karp demo (physical blocking flow augmentation)..." << std::endl;
    96     GW::EdgeMap<int> flow(gw); //0 flow
    97 
    98     Timer ts;
    99     ts.reset();
    100 
    101     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
    102     EMW cw(cap);
    103     MaxFlow<GW, int, GW::EdgeMap<int>, EMW > max_flow_test(gw, s, t, flow, cw);
     94    Graph::EdgeMap<int> flow(G); //0 flow
     95
     96    Timer ts;
     97    ts.reset();
     98
     99    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     100      max_flow_test(G, s, t, flow, cap);
    104101    int i=0;
    105102    while (max_flow_test.augmentOnBlockingFlow<MutableGraph>()) {
     
    122119
    123120  {
    124     typedef TrivGraphWrapper<const Graph> GW;
    125     GW gw(G);
    126121    std::cout << "edmonds karp demo (physical blocking flow 1 augmentation)..." << std::endl;
    127     GW::EdgeMap<int> flow(gw); //0 flow
    128 
    129     Timer ts;
    130     ts.reset();
    131 
    132     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
    133     EMW cw(cap);
    134     MaxFlow<GW, int, GW::EdgeMap<int>, EMW > max_flow_test(gw, s, t, flow, cw);
     122    Graph::EdgeMap<int> flow(G); //0 flow
     123
     124    Timer ts;
     125    ts.reset();
     126
     127    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     128      max_flow_test(G, s, t, flow, cap);
    135129    int i=0;
    136130    while (max_flow_test.augmentOnBlockingFlow1<MutableGraph>()) {
     
    153147
    154148  {
    155     typedef TrivGraphWrapper<const Graph> GW;
    156     GW gw(G);
    157149    std::cout << "edmonds karp demo (on-the-fly blocking flow augmentation)..." << std::endl;
    158     GW::EdgeMap<int> flow(gw); //0 flow
    159 
    160     Timer ts;
    161     ts.reset();
    162 
    163     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
    164     EMW cw(cap);
    165     MaxFlow<GW, int, GW::EdgeMap<int>, EMW > max_flow_test(gw, s, t, flow, cw);
     150    Graph::EdgeMap<int> flow(G); //0 flow
     151
     152    Timer ts;
     153    ts.reset();
     154
     155    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     156      max_flow_test(G, s, t, flow, cap);
    166157    int i=0;
    167158    while (max_flow_test.augmentOnBlockingFlow2()) {
     
    184175
    185176  {
    186     typedef TrivGraphWrapper<const Graph> GW;
    187     GW gw(G);
    188177    std::cout << "edmonds karp demo (on-the-fly shortest path augmentation)..." << std::endl;
    189     GW::EdgeMap<int> flow(gw); //0 flow
    190 
    191     Timer ts;
    192     ts.reset();
    193 
    194     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
    195     EMW cw(cap);
    196     MaxFlow<GW, int, GW::EdgeMap<int>, EMW> max_flow_test(gw, s, t, flow, cw);
     178    Graph::EdgeMap<int> flow(G); //0 flow
     179
     180    Timer ts;
     181    ts.reset();
     182
     183    MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
     184      max_flow_test(G, s, t, flow, cap);
    197185    int i=0;
    198186    while (max_flow_test.augmentOnShortestPath()) {
Note: See TracChangeset for help on using the changeset viewer.