COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/alpar/emptygraph.h @ 146:c4adf922624f

Last change on this file since 146:c4adf922624f was 145:07c32a103bbb, checked in by Alpar Juttner, 17 years ago

next() -> getNext()
goNext() -> next()

File size: 2.2 KB
RevLine 
[52]1// -*-mode: c++; -*-
2
[145]3class EmptyGraph
[52]4{
5public:
[145]6
[52]7  class EdgeIt {};
8 
[67]9  class InEdgeIt : public EdgeIt {};
[52]10  class OutEdgeIt : public EdgeIt {};
11  class SymEdgeIt : public EdgeIt {};
12  class EachEdgeIt : public EdgeIt {};
13
14  class NodeIt {};
15   
[67]16  NodeIt &getFirst(NodeIt &) const {}
17  InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {}
18  OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {}
19  SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
20  EachEdgeIt &getFirst(EachEdgeIt &) const {}
[52]21
[145]22  NodeIt getNext(NodeIt) const {}
23  InEdgeIt getNext(InEdgeIt) const {}
24  OutEdgeIt getNext(OutEdgeIt) const {}
25  SymEdgeIt getNext(SymEdgeIt) const {}
26  EachEdgeIt getNext(EachEdgeIt) const {}
[52]27
[145]28  NodeIt &next(NodeIt &) const {}
29  InEdgeIt &next(InEdgeIt &) const {}
30  OutEdgeIt &next(OutEdgeIt &) const {}
31  SymEdgeIt &next(SymEdgeIt &) const {}
32  EachEdgeIt &next(EachEdgeIt &) const {}
[52]33
[67]34  NodeIt head(EdgeIt) const {}
35  NodeIt tail(EdgeIt) const {}
[55]36 
[67]37  NodeIt aNode(InEdgeIt) const {}
38  NodeIt aNode(OutEdgeIt) const {}
39  NodeIt aNode(SymEdgeIt) const {}
[52]40
[67]41  NodeIt bNode(InEdgeIt) const {}
42  NodeIt bNode(OutEdgeIt) const {}
43  NodeIt bNode(SymEdgeIt) const {}
[55]44
[67]45  //bool valid(const NodeIt) const {};
46  //bool valid(const EdgeIt) const {};
[55]47
[67]48  //void setInvalid(NodeIt &) const {};
49  //void setInvalid(EdgeIt &) const {};
[52]50 
[67]51  NodeIt addNode() {}
52  EdgeIt addEdge(NodeIt tail, NodeIt head) {}
[52]53   
[67]54  void erase(NodeIt n) {}
55  void erase(EdgeIt e) {}
[52]56
[67]57  void clear() {}
[52]58
59  template<class T> class NodeMap
60  {
61  public:
[61]62    typedef T ValueType;
63    typedef NodeIt KeyType;
[67]64    void set(NodeIt i, T t) {}
65    T get(NodeIt i) const {}
66    T &operator[](NodeIt i) {}
[52]67     
[67]68    NodeMap(const Graph &G) {}
69    NodeMap(const Graph &G, T t) {}
[52]70  };
71
72  template<class T> class EdgeMap
73  {
74  public:
[61]75    typedef T ValueType;
76    typedef EdgeIt KeyType;
[67]77    void set(EdgeIt i, T t) {}
78    T get(EdgeIt i) const {}
79    T &operator[](EdgeIt i) {}
[52]80     
[67]81    EdgeMap(const Graph &G) {}
82    EdgeMap(const Graph &G, T t) {}
[52]83  };
84};
[145]85
86class EmptyBipGraph : public EmptyGraph
87{
88  class ANodeIt {};
89  class BNodeIt {};
90
91  ANodeIt &next(ANodeIt &) {}
92  BNodeIt &next(BNodeIt &) {}
93
94  ANodeIt &getFirst(ANodeIt &) const {}
95  BNodeIt &getFirst(BNodeIt &) const {}
96
97  enum NodeClass { A = 0, B = 1 };
98  NodeClass getClass(NodeIt n) {}
99
100}
Note: See TracBrowser for help on using the repository browser.