src/work/marci/edmonds_karp_demo.cc
changeset 288 84e75e8f2fd2
parent 269 07af3069c0b8
child 303 1b377a730d02
equal deleted inserted replaced
17:313eb31b3284 18:0eeed93aaf94
    91 
    91 
    92   {
    92   {
    93     typedef TrivGraphWrapper<const Graph> GW;
    93     typedef TrivGraphWrapper<const Graph> GW;
    94     GW gw(G);
    94     GW gw(G);
    95     std::cout << "edmonds karp demo (physical blocking flow augmentation)..." << std::endl;
    95     std::cout << "edmonds karp demo (physical blocking flow augmentation)..." << std::endl;
    96     GW::EdgeMap<int> flow(G); //0 flow
    96     GW::EdgeMap<int> flow(gw); //0 flow
    97 
    97 
    98     Timer ts;
    98     Timer ts;
    99     ts.reset();
    99     ts.reset();
   100 
   100 
   101     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
   101     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
   122 
   122 
   123   {
   123   {
   124     typedef TrivGraphWrapper<const Graph> GW;
   124     typedef TrivGraphWrapper<const Graph> GW;
   125     GW gw(G);
   125     GW gw(G);
   126     std::cout << "edmonds karp demo (physical blocking flow 1 augmentation)..." << std::endl;
   126     std::cout << "edmonds karp demo (physical blocking flow 1 augmentation)..." << std::endl;
   127     GW::EdgeMap<int> flow(G); //0 flow
   127     GW::EdgeMap<int> flow(gw); //0 flow
   128 
   128 
   129     Timer ts;
   129     Timer ts;
   130     ts.reset();
   130     ts.reset();
   131 
   131 
   132     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
   132     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
   153 
   153 
   154   {
   154   {
   155     typedef TrivGraphWrapper<const Graph> GW;
   155     typedef TrivGraphWrapper<const Graph> GW;
   156     GW gw(G);
   156     GW gw(G);
   157     std::cout << "edmonds karp demo (on-the-fly blocking flow augmentation)..." << std::endl;
   157     std::cout << "edmonds karp demo (on-the-fly blocking flow augmentation)..." << std::endl;
   158     GW::EdgeMap<int> flow(G); //0 flow
   158     GW::EdgeMap<int> flow(gw); //0 flow
   159 
   159 
   160     Timer ts;
   160     Timer ts;
   161     ts.reset();
   161     ts.reset();
   162 
   162 
   163     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;
   163     typedef GW::EdgeMapWrapper< Graph::EdgeMap<int>, int > EMW;