src/work/alpar/f_ed_ka_demo.cc
changeset 103 063de9e1be98
parent 95 3322fbf254d2
child 108 0351b00fd283
     1.1 --- a/src/work/alpar/f_ed_ka_demo.cc	Thu Feb 19 22:28:33 2004 +0000
     1.2 +++ b/src/work/alpar/f_ed_ka_demo.cc	Fri Feb 20 00:27:49 2004 +0000
     1.3 @@ -1,6 +1,8 @@
     1.4  #include <iostream>
     1.5  #include <fstream>
     1.6  
     1.7 +#include "smart_graph.h"
     1.8 +
     1.9  #include "../list_graph.hh"
    1.10  #include "../marci/dimacs.hh"
    1.11  #include "f_ed_ka.h"
    1.12 @@ -12,17 +14,20 @@
    1.13  // read_dimacs_demo < dimacs_max_flow_file
    1.14  
    1.15  int main(int, char **) {
    1.16 -  typedef ListGraph::NodeIt NodeIt;
    1.17 -  typedef ListGraph::EachNodeIt EachNodeIt;
    1.18 -  typedef ListGraph::EachEdgeIt EachEdgeIt;
    1.19 +  //  typedef SmartGraph Graph;
    1.20 +  typedef ListGraph Graph;
    1.21  
    1.22 -  ListGraph G;
    1.23 +  typedef Graph::NodeIt NodeIt;
    1.24 +  typedef Graph::EachNodeIt EachNodeIt;
    1.25 +  typedef Graph::EachEdgeIt EachEdgeIt;
    1.26 +
    1.27 +  Graph G;
    1.28    NodeIt s, t;
    1.29 -  ListGraph::EdgeMap<int> cap(G);
    1.30 +  Graph::EdgeMap<int> cap(G);
    1.31    readDimacsMaxFlow(std::cin, G, s, t, cap);
    1.32  
    1.33    std::cout << "edmonds karp demo..." << std::endl;
    1.34 -  ListGraph::EdgeMap<int> flow(G); //0 flow
    1.35 +  Graph::EdgeMap<int> flow(G); //0 flow
    1.36    
    1.37    int ret;
    1.38    double pre_time=currTime();