.
authoralpar
Fri, 20 Feb 2004 00:27:49 +0000
changeset 103063de9e1be98
parent 102 294cb99af985
child 104 7a2d991e9852
.
src/work/alpar/f_ed_ka_demo.cc
src/work/alpar/gwrapper.h
     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();
     2.1 --- a/src/work/alpar/gwrapper.h	Thu Feb 19 22:28:33 2004 +0000
     2.2 +++ b/src/work/alpar/gwrapper.h	Fri Feb 20 00:27:49 2004 +0000
     2.3 @@ -1,4 +1,8 @@
     2.4  // -*-mode: c++; -*-
     2.5 +#ifndef GRAPH_WRAPPER_H
     2.6 +#define GRAPH_WRAPPER_H
     2.7 +
     2.8 +namespace marci {
     2.9  
    2.10  template<typename G>
    2.11  class TrivGraphWrapper