next, getNext
authormarci
Mon, 01 Mar 2004 14:33:00 +0000
changeset 139c76f1eea05d2
parent 138 c6297c121409
child 140 ca164520d31a
next, getNext
src/work/list_graph.hh
src/work/marci/edmonds_karp_demo.cc
     1.1 --- a/src/work/list_graph.hh	Mon Mar 01 12:06:56 2004 +0000
     1.2 +++ b/src/work/list_graph.hh	Mon Mar 01 14:33:00 2004 +0000
     1.3 @@ -305,9 +305,9 @@
     1.4      bool valid(EdgeIt e) const { return e.valid(); }
     1.5      bool valid(NodeIt n) const { return n.valid(); }
     1.6      
     1.7 -    template <typename It> It next(It it) const { 
     1.8 -      It tmp(it); return goNext(tmp); }
     1.9 -    template <typename It> It& goNext(It& it) const { return ++it; }
    1.10 +    template <typename It> It getNext(It it) const { 
    1.11 +      It tmp(it); return next(tmp); }
    1.12 +    template <typename It> It& next(It& it) const { return ++it; }
    1.13     
    1.14  
    1.15      /* for getting id's of graph objects */
     2.1 --- a/src/work/marci/edmonds_karp_demo.cc	Mon Mar 01 12:06:56 2004 +0000
     2.2 +++ b/src/work/marci/edmonds_karp_demo.cc	Mon Mar 01 14:33:00 2004 +0000
     2.3 @@ -10,10 +10,41 @@
     2.4  
     2.5  // Use a DIMACS max flow file as stdin.
     2.6  // read_dimacs_demo < dimacs_max_flow_file
     2.7 +
     2.8 +/*
     2.9 +  struct Ize {
    2.10 +  };
    2.11 +  
    2.12 +  struct Mize {
    2.13 +    Ize bumm;
    2.14 +  };
    2.15 +
    2.16 +  template <typename B>
    2.17 +    class Huha {
    2.18 +    public:
    2.19 +      int u;
    2.20 +      B brr;
    2.21 +    };
    2.22 +*/
    2.23 +
    2.24  int main(int, char **) {
    2.25    typedef ListGraph::NodeIt NodeIt;
    2.26    typedef ListGraph::EachEdgeIt EachEdgeIt;
    2.27  
    2.28 +/*
    2.29 +  Mize mize[10];
    2.30 +  Mize bize[0];
    2.31 +  Mize zize;
    2.32 +  typedef Mize Tize[0];
    2.33 +
    2.34 +  std::cout << &zize << " " << sizeof(mize) << sizeof(Tize) << std::endl;
    2.35 +  std::cout << sizeof(bize) << std::endl;
    2.36 +
    2.37 +
    2.38 +  Huha<Tize> k;
    2.39 +  std::cout << sizeof(k) << std::endl;
    2.40 +*/
    2.41 +
    2.42    ListGraph G;
    2.43    NodeIt s, t;
    2.44    ListGraph::EdgeMap<int> cap(G);