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