src/work/marci/preflow_demo_athos.cc
changeset 604 4acd273c3009
parent 105 a3c73e9b9b2e
child 921 818510fa3d99
equal deleted inserted replaced
1:b28982379571 2:7741d75bcf3f
     1 #include <iostream>
     1 #include <iostream>
     2 #include <fstream>
     2 #include <fstream>
     3 
     3 
     4 #include <list_graph.hh>
     4 #include <list_graph.h>
     5 #include <dimacs.hh>
     5 #include <dimacs.h>
     6 #include <preflow_push.hh>
     6 #include <preflow_push.hh>
     7 #include <time_measure.h>
     7 #include <time_measure.h>
     8 
     8 
     9 using namespace hugo;
     9 using namespace hugo;
    10 
    10 
    11 // Use a DIMACS max flow file as stdin.
    11 // Use a DIMACS max flow file as stdin.
    12 // read_dimacs_demo < dimacs_max_flow_file
    12 // read_dimacs_demo < dimacs_max_flow_file
    13 int main(int, char **) {
    13 int main(int, char **) {
    14   typedef ListGraph::NodeIt NodeIt;
    14   typedef ListGraph::Node Node;
    15   typedef ListGraph::EachEdgeIt EachEdgeIt;
    15   //typedef ListGraph::EachEdgeIt EachEdgeIt;
    16 
    16 
    17   ListGraph G;
    17   ListGraph G;
    18   NodeIt s, t;
    18   Node s, t;
    19   ListGraph::EdgeMap<int> cap(G);
    19   ListGraph::EdgeMap<int> cap(G);
    20   readDimacsMaxFlow(std::cin, G, s, t, cap);
    20   readDimacsMaxFlow(std::cin, G, s, t, cap);
    21 
    21 
    22   std::cout << "preflow demo (ATHOS)..." << std::endl;
    22   std::cout << "preflow demo (ATHOS)..." << std::endl;
    23   //ListGraph::EdgeMap<int> flow(G); //0 flow
    23   //ListGraph::EdgeMap<int> flow(G); //0 flow