[52] | 1 | // -*-mode: c++; -*- |
---|
| 2 | |
---|
[145] | 3 | class EmptyGraph |
---|
[52] | 4 | { |
---|
| 5 | public: |
---|
[145] | 6 | |
---|
[147] | 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 | }; |
---|
[52] | 28 | |
---|
[147] | 29 | class OutEdgeIt : public EdgeIt { |
---|
| 30 | OutEdgeIt() {} |
---|
| 31 | OutEdgeIt(const EmptyGraph &, NodeIt) {} |
---|
| 32 | }; |
---|
[52] | 33 | |
---|
[147] | 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() {} |
---|
[157] | 41 | EachEdgeIt(const EmptyGraph &) {} |
---|
[147] | 42 | }; |
---|
| 43 | |
---|
| 44 | EachNodeIt &getFirst(EachNodeIt &) const {} |
---|
[67] | 45 | InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {} |
---|
| 46 | OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {} |
---|
[147] | 47 | // SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {} |
---|
[67] | 48 | EachEdgeIt &getFirst(EachEdgeIt &) const {} |
---|
[52] | 49 | |
---|
[145] | 50 | NodeIt getNext(NodeIt) const {} |
---|
| 51 | InEdgeIt getNext(InEdgeIt) const {} |
---|
| 52 | OutEdgeIt getNext(OutEdgeIt) const {} |
---|
[147] | 53 | //SymEdgeIt getNext(SymEdgeIt) const {} |
---|
[145] | 54 | EachEdgeIt getNext(EachEdgeIt) const {} |
---|
[52] | 55 | |
---|
[145] | 56 | NodeIt &next(NodeIt &) const {} |
---|
| 57 | InEdgeIt &next(InEdgeIt &) const {} |
---|
| 58 | OutEdgeIt &next(OutEdgeIt &) const {} |
---|
[147] | 59 | //SymEdgeIt &next(SymEdgeIt &) const {} |
---|
[145] | 60 | EachEdgeIt &next(EachEdgeIt &) const {} |
---|
[52] | 61 | |
---|
[67] | 62 | NodeIt head(EdgeIt) const {} |
---|
| 63 | NodeIt tail(EdgeIt) const {} |
---|
[55] | 64 | |
---|
[147] | 65 | // NodeIt aNode(InEdgeIt) const {} |
---|
| 66 | // NodeIt aNode(OutEdgeIt) const {} |
---|
| 67 | // NodeIt aNode(SymEdgeIt) const {} |
---|
[52] | 68 | |
---|
[147] | 69 | // NodeIt bNode(InEdgeIt) const {} |
---|
| 70 | // NodeIt bNode(OutEdgeIt) const {} |
---|
| 71 | // NodeIt bNode(SymEdgeIt) const {} |
---|
[55] | 72 | |
---|
[147] | 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 {}; |
---|
[55] | 78 | |
---|
[67] | 79 | //void setInvalid(NodeIt &) const {}; |
---|
| 80 | //void setInvalid(EdgeIt &) const {}; |
---|
[52] | 81 | |
---|
[67] | 82 | NodeIt addNode() {} |
---|
| 83 | EdgeIt addEdge(NodeIt tail, NodeIt head) {} |
---|
[52] | 84 | |
---|
[67] | 85 | void erase(NodeIt n) {} |
---|
| 86 | void erase(EdgeIt e) {} |
---|
[52] | 87 | |
---|
[67] | 88 | void clear() {} |
---|
[52] | 89 | |
---|
[147] | 90 | int nodeNum() {} |
---|
| 91 | int edgeNum() {} |
---|
| 92 | |
---|
[52] | 93 | template<class T> class NodeMap |
---|
| 94 | { |
---|
| 95 | public: |
---|
[61] | 96 | typedef T ValueType; |
---|
| 97 | typedef NodeIt KeyType; |
---|
[147] | 98 | |
---|
[67] | 99 | NodeMap(const Graph &G) {} |
---|
| 100 | NodeMap(const Graph &G, T t) {} |
---|
[147] | 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 |
---|
[52] | 109 | }; |
---|
| 110 | |
---|
| 111 | template<class T> class EdgeMap |
---|
| 112 | { |
---|
| 113 | public: |
---|
[61] | 114 | typedef T ValueType; |
---|
| 115 | typedef EdgeIt KeyType; |
---|
[147] | 116 | |
---|
| 117 | EdgeMap(const Graph &G) {} |
---|
| 118 | EdgeMap(const Graph &G, T t) {} |
---|
| 119 | |
---|
[67] | 120 | void set(EdgeIt i, T t) {} |
---|
| 121 | T get(EdgeIt i) const {} |
---|
| 122 | T &operator[](EdgeIt i) {} |
---|
[147] | 123 | |
---|
| 124 | update() {} |
---|
| 125 | update(T a) {} //FIXME: Is it necessary |
---|
[52] | 126 | }; |
---|
| 127 | }; |
---|
[145] | 128 | |
---|
| 129 | |
---|
[147] | 130 | // class EmptyBipGraph : public EmptyGraph |
---|
| 131 | // { |
---|
| 132 | // class ANodeIt {}; |
---|
| 133 | // class BNodeIt {}; |
---|
[145] | 134 | |
---|
[147] | 135 | // ANodeIt &next(ANodeIt &) {} |
---|
| 136 | // BNodeIt &next(BNodeIt &) {} |
---|
[145] | 137 | |
---|
[147] | 138 | // ANodeIt &getFirst(ANodeIt &) const {} |
---|
| 139 | // BNodeIt &getFirst(BNodeIt &) const {} |
---|
[145] | 140 | |
---|
[147] | 141 | // enum NodeClass { A = 0, B = 1 }; |
---|
| 142 | // NodeClass getClass(NodeIt n) {} |
---|
| 143 | |
---|
| 144 | // } |
---|