author | alpar |
Thu, 05 Feb 2004 15:56:12 +0000 | |
changeset 65 | a63cef252656 |
parent 61 | 30e734e6adff |
child 67 | 5f86199dcf3e |
permissions | -rw-r--r-- |
alpar@52 | 1 |
// -*-mode: c++; -*- |
alpar@52 | 2 |
|
alpar@52 | 3 |
class Graph |
alpar@52 | 4 |
{ |
alpar@52 | 5 |
public: |
alpar@52 | 6 |
class EdgeIt {}; |
alpar@52 | 7 |
|
alpar@52 | 8 |
class InEdgeIt : public EdgeIt |
alpar@52 | 9 |
class OutEdgeIt : public EdgeIt {}; |
alpar@52 | 10 |
class SymEdgeIt : public EdgeIt {}; |
alpar@52 | 11 |
class EachEdgeIt : public EdgeIt {}; |
alpar@52 | 12 |
|
alpar@52 | 13 |
class NodeIt {}; |
alpar@52 | 14 |
|
alpar@62 | 15 |
NodeIt &getFirst(NodeIt &) const {}; |
alpar@62 | 16 |
InEdgeIt &getFirst(InEdgeIt &,const NodeIt) const {}; |
alpar@62 | 17 |
OutEdgeIt &getFirst(OutEdgeIt &,const NodeIt) const {}; |
alpar@62 | 18 |
SymEdgeIt &getFirst(SymEdgeIt &,const NodeIt) const {}; |
alpar@62 | 19 |
EachEdgeIt &getFirst(EachEdgeIt &) const {}; |
alpar@52 | 20 |
|
alpar@62 | 21 |
NodeIt next(const NodeIt) const {}; |
alpar@62 | 22 |
InEdgeIt next(const InEdgeIt) const {}; |
alpar@62 | 23 |
OutEdgeIt next(const OutEdgeIt) const {}; |
alpar@62 | 24 |
SymEdgeIt next(const SymEdgeIt) const {}; |
alpar@62 | 25 |
EachEdgeIt next(const EachEdgeIt) const {}; |
alpar@52 | 26 |
|
alpar@62 | 27 |
NodeIt &goNext(NodeIt &) const {}; |
alpar@62 | 28 |
InEdgeIt &goNext(InEdgeIt &) const {}; |
alpar@62 | 29 |
OutEdgeIt &goNext(OutEdgeIt &) const {}; |
alpar@62 | 30 |
SymEdgeIt &goNext(SymEdgeIt &) const {}; |
alpar@62 | 31 |
EachEdgeIt &goNext(EachEdgeIt &) const {}; |
alpar@52 | 32 |
|
alpar@62 | 33 |
NodeIt head(const EdgeIt) const {}; |
alpar@62 | 34 |
NodeIt tail(const EdgeIt) const {}; |
alpar@55 | 35 |
|
alpar@62 | 36 |
NodeIt aNode(const InEdgeIt) const {}; |
alpar@62 | 37 |
NodeIt aNode(const OutEdgeIt) const {}; |
alpar@62 | 38 |
NodeIt aNode(const SymEdgeIt) const {}; |
alpar@52 | 39 |
|
alpar@62 | 40 |
NodeIt bNode(const InEdgeIt) const {}; |
alpar@62 | 41 |
NodeIt bNode(const OutEdgeIt) const {}; |
alpar@62 | 42 |
NodeIt bNode(const SymEdgeIt) const {}; |
alpar@55 | 43 |
|
alpar@62 | 44 |
bool valid(const NodeIt) const {}; |
alpar@62 | 45 |
bool valid(const EdgeIt) const {}; |
alpar@55 | 46 |
|
alpar@62 | 47 |
void setInvalid(NodeIt &) const {}; |
alpar@62 | 48 |
void setInvalid(EdgeIt &) const {}; |
alpar@52 | 49 |
|
alpar@62 | 50 |
NodeIt addNode() {}; |
alpar@62 | 51 |
EdgeIt addEdge(const NodeIt from,const NodeIt to) {}; |
alpar@52 | 52 |
|
alpar@62 | 53 |
void delete(NodeIt n) {}; |
alpar@62 | 54 |
void delete(EdgeIt e) {}; |
alpar@52 | 55 |
|
alpar@62 | 56 |
void clear() {}; |
alpar@52 | 57 |
|
alpar@52 | 58 |
template<class T> class NodeMap |
alpar@52 | 59 |
{ |
alpar@52 | 60 |
public: |
alpar@61 | 61 |
typedef T ValueType; |
alpar@61 | 62 |
typedef NodeIt KeyType; |
alpar@62 | 63 |
void set(const NodeIt i, const T &t) {}; |
alpar@62 | 64 |
T get(const NodeIt i) const {}; |
alpar@62 | 65 |
T &operator[](const NodeIt i) {}; |
alpar@52 | 66 |
|
alpar@62 | 67 |
NodeMap(const Graph &G) {}; |
alpar@52 | 68 |
}; |
alpar@52 | 69 |
|
alpar@52 | 70 |
template<class T> class EdgeMap |
alpar@52 | 71 |
{ |
alpar@52 | 72 |
public: |
alpar@61 | 73 |
typedef T ValueType; |
alpar@61 | 74 |
typedef EdgeIt KeyType; |
alpar@62 | 75 |
void set(const EdgeIt i, const T &t) {}; |
alpar@62 | 76 |
T get(const EdgeIt i) const {}; |
alpar@62 | 77 |
T &operator[](const EdgeIt i) {}; |
alpar@52 | 78 |
|
alpar@62 | 79 |
EdgeMap(const Graph &G) {}; |
alpar@52 | 80 |
}; |
alpar@52 | 81 |
}; |