.
1.1 --- a/src/work/alpar/emptygraph.h Thu Feb 05 17:35:42 2004 +0000
1.2 +++ b/src/work/alpar/emptygraph.h Fri Feb 06 11:45:47 2004 +0000
1.3 @@ -5,66 +5,67 @@
1.4 public:
1.5 class EdgeIt {};
1.6
1.7 - class InEdgeIt : public EdgeIt
1.8 + class InEdgeIt : public EdgeIt {};
1.9 class OutEdgeIt : public EdgeIt {};
1.10 class SymEdgeIt : public EdgeIt {};
1.11 class EachEdgeIt : public EdgeIt {};
1.12
1.13 class NodeIt {};
1.14
1.15 - NodeIt &getFirst(NodeIt &) const {};
1.16 - InEdgeIt &getFirst(InEdgeIt &,const NodeIt) const {};
1.17 - OutEdgeIt &getFirst(OutEdgeIt &,const NodeIt) const {};
1.18 - SymEdgeIt &getFirst(SymEdgeIt &,const NodeIt) const {};
1.19 - EachEdgeIt &getFirst(EachEdgeIt &) const {};
1.20 + NodeIt &getFirst(NodeIt &) const {}
1.21 + InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {}
1.22 + OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {}
1.23 + SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
1.24 + EachEdgeIt &getFirst(EachEdgeIt &) const {}
1.25
1.26 - NodeIt next(const NodeIt) const {};
1.27 - InEdgeIt next(const InEdgeIt) const {};
1.28 - OutEdgeIt next(const OutEdgeIt) const {};
1.29 - SymEdgeIt next(const SymEdgeIt) const {};
1.30 - EachEdgeIt next(const EachEdgeIt) const {};
1.31 + NodeIt next(NodeIt) const {}
1.32 + InEdgeIt next(InEdgeIt) const {}
1.33 + OutEdgeIt next(OutEdgeIt) const {}
1.34 + SymEdgeIt next(SymEdgeIt) const {}
1.35 + EachEdgeIt next(EachEdgeIt) const {}
1.36
1.37 - NodeIt &goNext(NodeIt &) const {};
1.38 - InEdgeIt &goNext(InEdgeIt &) const {};
1.39 - OutEdgeIt &goNext(OutEdgeIt &) const {};
1.40 - SymEdgeIt &goNext(SymEdgeIt &) const {};
1.41 - EachEdgeIt &goNext(EachEdgeIt &) const {};
1.42 + NodeIt &goNext(NodeIt &) const {}
1.43 + InEdgeIt &goNext(InEdgeIt &) const {}
1.44 + OutEdgeIt &goNext(OutEdgeIt &) const {}
1.45 + SymEdgeIt &goNext(SymEdgeIt &) const {}
1.46 + EachEdgeIt &goNext(EachEdgeIt &) const {}
1.47
1.48 - NodeIt head(const EdgeIt) const {};
1.49 - NodeIt tail(const EdgeIt) const {};
1.50 + NodeIt head(EdgeIt) const {}
1.51 + NodeIt tail(EdgeIt) const {}
1.52
1.53 - NodeIt aNode(const InEdgeIt) const {};
1.54 - NodeIt aNode(const OutEdgeIt) const {};
1.55 - NodeIt aNode(const SymEdgeIt) const {};
1.56 + NodeIt aNode(InEdgeIt) const {}
1.57 + NodeIt aNode(OutEdgeIt) const {}
1.58 + NodeIt aNode(SymEdgeIt) const {}
1.59
1.60 - NodeIt bNode(const InEdgeIt) const {};
1.61 - NodeIt bNode(const OutEdgeIt) const {};
1.62 - NodeIt bNode(const SymEdgeIt) const {};
1.63 + NodeIt bNode(InEdgeIt) const {}
1.64 + NodeIt bNode(OutEdgeIt) const {}
1.65 + NodeIt bNode(SymEdgeIt) const {}
1.66
1.67 - bool valid(const NodeIt) const {};
1.68 - bool valid(const EdgeIt) const {};
1.69 + //bool valid(const NodeIt) const {};
1.70 + //bool valid(const EdgeIt) const {};
1.71
1.72 - void setInvalid(NodeIt &) const {};
1.73 - void setInvalid(EdgeIt &) const {};
1.74 + //void setInvalid(NodeIt &) const {};
1.75 + //void setInvalid(EdgeIt &) const {};
1.76
1.77 - NodeIt addNode() {};
1.78 - EdgeIt addEdge(const NodeIt from,const NodeIt to) {};
1.79 + NodeIt addNode() {}
1.80 + EdgeIt addEdge(NodeIt tail, NodeIt head) {}
1.81
1.82 - void delete(NodeIt n) {};
1.83 - void delete(EdgeIt e) {};
1.84 + void erase(NodeIt n) {}
1.85 + void erase(EdgeIt e) {}
1.86
1.87 - void clear() {};
1.88 + void clear() {}
1.89
1.90 template<class T> class NodeMap
1.91 {
1.92 public:
1.93 typedef T ValueType;
1.94 typedef NodeIt KeyType;
1.95 - void set(const NodeIt i, const T &t) {};
1.96 - T get(const NodeIt i) const {};
1.97 - T &operator[](const NodeIt i) {};
1.98 + void set(NodeIt i, T t) {}
1.99 + T get(NodeIt i) const {}
1.100 + T &operator[](NodeIt i) {}
1.101
1.102 - NodeMap(const Graph &G) {};
1.103 + NodeMap(const Graph &G) {}
1.104 + NodeMap(const Graph &G, T t) {}
1.105 };
1.106
1.107 template<class T> class EdgeMap
1.108 @@ -72,10 +73,11 @@
1.109 public:
1.110 typedef T ValueType;
1.111 typedef EdgeIt KeyType;
1.112 - void set(const EdgeIt i, const T &t) {};
1.113 - T get(const EdgeIt i) const {};
1.114 - T &operator[](const EdgeIt i) {};
1.115 + void set(EdgeIt i, T t) {}
1.116 + T get(EdgeIt i) const {}
1.117 + T &operator[](EdgeIt i) {}
1.118
1.119 - EdgeMap(const Graph &G) {};
1.120 + EdgeMap(const Graph &G) {}
1.121 + EdgeMap(const Graph &G, T t) {}
1.122 };
1.123 };
2.1 --- a/src/work/list_graph.hh Thu Feb 05 17:35:42 2004 +0000
2.2 +++ b/src/work/list_graph.hh Fri Feb 06 11:45:47 2004 +0000
2.3 @@ -212,7 +212,7 @@
2.4 ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0) { }
2.5
2.6 ~ListGraph() {
2.7 - while (first<EachNodeIt>().valid()) deleteNode(first<EachNodeIt>());
2.8 + while (first<EachNodeIt>().valid()) erase(first<EachNodeIt>());
2.9 }
2.10
2.11 int nodeNum() const { return _node_num; }
2.12 @@ -293,13 +293,13 @@
2.13 return EdgeIt(_add_edge(u.node, v.node));
2.14 }
2.15
2.16 - void deleteNode(NodeIt i) {
2.17 - while (first<OutEdgeIt>(i).valid()) deleteEdge(first<OutEdgeIt>(i));
2.18 - while (first<InEdgeIt>(i).valid()) deleteEdge(first<InEdgeIt>(i));
2.19 + void erase(NodeIt i) {
2.20 + while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
2.21 + while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
2.22 _delete_node(i.node);
2.23 }
2.24
2.25 - void deleteEdge(EdgeIt e) { _delete_edge(e.edge); }
2.26 + void erase(EdgeIt e) { _delete_edge(e.edge); }
2.27
2.28 void setTail(EdgeIt e, NodeIt tail) {
2.29 _set_tail(e.edge, tail.node);