COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/alpar/emptygraph.h @ 160:f1a7005e9dff

Last change on this file since 160:f1a7005e9dff was 157:ee17030e5f47, checked in by Alpar Juttner, 21 years ago

One more step toward the standars interface.

File size: 3.3 KB
Line 
1// -*-mode: c++; -*-
2
3class EmptyGraph
4{
5public:
6
7  class NodeIt {
8  public:
9    NodeIt() {}   //FIXME
10    //NodeIt(const NodeIt &) {}
11    bool operator==(NodeIt n) const {} //FIXME
12    bool operator!=(NodeIt n) const {} //FIXME
13  };
14   
15  class EachNodeIt : public NodeIt {
16  public:
17    EachNodeIt() {} //FIXME
18    EachNodeIt(const EmptyGraph &) const {}
19    EachNodeIt(const EachNodeIt &) const {} //FIXME
20  };
21   
22  class EdgeIt {
23    EdgeIt() {}   //FIXME
24    //EdgeIt(const EdgeIt &) {}
25    bool operator==(EdgeIt n) const {} //FIXME
26    bool operator!=(EdgeIt n) const {} //FIXME   
27  };
28 
29  class OutEdgeIt : public EdgeIt {
30    OutEdgeIt() {}
31    OutEdgeIt(const EmptyGraph &, NodeIt) {}
32  };
33
34  class InEdgeIt : public EdgeIt {
35    InEdgeIt() {}
36    InEdgeIt(const EmptyGraph &, NodeIt) {}   
37  };
38  //  class SymEdgeIt : public EdgeIt {};
39  class EachEdgeIt : public EdgeIt {
40    EachEdgeIt() {}
41    EachEdgeIt(const EmptyGraph &) {}
42  };
43
44  EachNodeIt &getFirst(EachNodeIt &) const {}
45  InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {}
46  OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {}
47  //  SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
48  EachEdgeIt &getFirst(EachEdgeIt &) const {}
49
50  NodeIt getNext(NodeIt) const {}
51  InEdgeIt getNext(InEdgeIt) const {}
52  OutEdgeIt getNext(OutEdgeIt) const {}
53  //SymEdgeIt getNext(SymEdgeIt) const {}
54  EachEdgeIt getNext(EachEdgeIt) const {}
55
56  NodeIt &next(NodeIt &) const {}
57  InEdgeIt &next(InEdgeIt &) const {}
58  OutEdgeIt &next(OutEdgeIt &) const {}
59  //SymEdgeIt &next(SymEdgeIt &) const {}
60  EachEdgeIt &next(EachEdgeIt &) const {}
61
62  NodeIt head(EdgeIt) const {}
63  NodeIt tail(EdgeIt) const {}
64 
65//   NodeIt aNode(InEdgeIt) const {}
66//   NodeIt aNode(OutEdgeIt) const {}
67//   NodeIt aNode(SymEdgeIt) const {}
68
69//   NodeIt bNode(InEdgeIt) const {}
70//   NodeIt bNode(OutEdgeIt) const {}
71//   NodeIt bNode(SymEdgeIt) const {}
72
73  bool valid(const NodeIt) const {};
74  bool valid(const EdgeIt) const {};
75
76  int id(const NodeIt) const {};
77  int id(const EdgeIt) const {};
78
79  //void setInvalid(NodeIt &) const {};
80  //void setInvalid(EdgeIt &) const {};
81 
82  NodeIt addNode() {}
83  EdgeIt addEdge(NodeIt tail, NodeIt head) {}
84   
85  void erase(NodeIt n) {}
86  void erase(EdgeIt e) {}
87
88  void clear() {}
89
90  int nodeNum() {}
91  int edgeNum() {}
92
93  template<class T> class NodeMap
94  {
95  public:
96    typedef T ValueType;
97    typedef NodeIt KeyType;
98
99    NodeMap(const Graph &G) {}
100    NodeMap(const Graph &G, T t) {}
101
102    void set(NodeIt i, T t) {}
103    T get(NodeIt i) const {}  //FIXME: Is it necessary
104    T &operator[](NodeIt i) {}
105    const T &operator[](NodeIt i) const {}
106
107    update() {}
108    update(T a) {}   //FIXME: Is it necessary
109  };
110
111  template<class T> class EdgeMap
112  {
113  public:
114    typedef T ValueType;
115    typedef EdgeIt KeyType;
116
117    EdgeMap(const Graph &G) {}
118    EdgeMap(const Graph &G, T t) {}
119   
120    void set(EdgeIt i, T t) {}
121    T get(EdgeIt i) const {}
122    T &operator[](EdgeIt i) {}
123   
124    update() {}
125    update(T a) {}   //FIXME: Is it necessary
126  };
127};
128
129
130// class EmptyBipGraph : public EmptyGraph
131// {
132//   class ANodeIt {};
133//   class BNodeIt {};
134
135//   ANodeIt &next(ANodeIt &) {}
136//   BNodeIt &next(BNodeIt &) {}
137
138//   ANodeIt &getFirst(ANodeIt &) const {}
139//   BNodeIt &getFirst(BNodeIt &) const {}
140
141//   enum NodeClass { A = 0, B = 1 };
142//   NodeClass getClass(NodeIt n) {}
143
144// }
Note: See TracBrowser for help on using the repository browser.