src/work/alpar/f_ed_ka_demo.cc
changeset 96 e2e18eb0fd10
parent 91 81bf58164f60
child 103 063de9e1be98
equal deleted inserted replaced
1:a85dc5ff6224 2:e9f6f8c94a32
    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 
    13 
    14 int main(int, char **) {
    14 int main(int, char **) {
       
    15   typedef ListGraph::NodeIt NodeIt;
    15   typedef ListGraph::EachNodeIt EachNodeIt;
    16   typedef ListGraph::EachNodeIt EachNodeIt;
    16   typedef ListGraph::EachEdgeIt EachEdgeIt;
    17   typedef ListGraph::EachEdgeIt EachEdgeIt;
    17 
    18 
    18   ListGraph G;
    19   ListGraph G;
    19   EachNodeIt s, t;
    20   NodeIt s, t;
    20   ListGraph::EdgeMap<int> cap(G);
    21   ListGraph::EdgeMap<int> cap(G);
    21   readDimacsMaxFlow(std::cin, G, s, t, cap);
    22   readDimacsMaxFlow(std::cin, G, s, t, cap);
    22 
    23 
    23   std::cout << "edmonds karp demo..." << std::endl;
    24   std::cout << "edmonds karp demo..." << std::endl;
    24   ListGraph::EdgeMap<int> flow(G); //0 flow
    25   ListGraph::EdgeMap<int> flow(G); //0 flow