1.1 --- a/src/work/marci/oldies/list_graph.hh Sun Apr 17 18:57:22 2005 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,552 +0,0 @@
1.4 -#ifndef LIST_GRAPH_HH
1.5 -#define LIST_GRAPH_HH
1.6 -
1.7 -#include <iostream>
1.8 -#include <vector>
1.9 -
1.10 -namespace hugo {
1.11 -
1.12 - template <typename It>
1.13 - int count(It it) {
1.14 - int i=0;
1.15 - for( ; it.valid(); ++it) { ++i; }
1.16 - return i;
1.17 - }
1.18 -
1.19 - class ListGraph {
1.20 -
1.21 - class node_item;
1.22 - class edge_item;
1.23 -
1.24 - public:
1.25 -
1.26 - class NodeIt;
1.27 - class EachNodeIt;
1.28 - class EdgeIt;
1.29 - class EachEdgeIt;
1.30 - class OutEdgeIt;
1.31 - class InEdgeIt;
1.32 - class SymEdgeIt;
1.33 - template <typename T> class NodeMap;
1.34 - template <typename T> class EdgeMap;
1.35 -
1.36 - private:
1.37 -
1.38 - template <typename T> friend class NodeMap;
1.39 - template <typename T> friend class EdgeMap;
1.40 -
1.41 - template <typename T>
1.42 - class NodeMap {
1.43 - const ListGraph& G;
1.44 - std::vector<T> container;
1.45 - public:
1.46 - typedef T ValueType;
1.47 - typedef NodeIt KeyType;
1.48 - NodeMap(const ListGraph& _G) : G(_G), container(G.node_id) { }
1.49 - NodeMap(const ListGraph& _G, T a) :
1.50 - G(_G), container(G.node_id, a) { }
1.51 - void set(NodeIt n, T a) { container[/*G.id(n)*/n.node->id]=a; }
1.52 - T get(NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
1.53 - T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; }
1.54 - const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
1.55 - void update() { container.resize(G.node_id); }
1.56 - void update(T a) { container.resize(G.node_id, a); }
1.57 - };
1.58 -
1.59 - template <typename T>
1.60 - class EdgeMap {
1.61 - const ListGraph& G;
1.62 - std::vector<T> container;
1.63 - public:
1.64 - typedef T ValueType;
1.65 - typedef EdgeIt KeyType;
1.66 - EdgeMap(const ListGraph& _G) : G(_G), container(G.edge_id) { }
1.67 - EdgeMap(const ListGraph& _G, T a) :
1.68 - G(_G), container(G.edge_id, a) { }
1.69 - void set(EdgeIt e, T a) { container[/*G.id(e)*/e.edge->id]=a; }
1.70 - T get(EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; }
1.71 - T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; }
1.72 - const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; }
1.73 - void update() { container.resize(G.edge_id); }
1.74 - void update(T a) { container.resize(G.edge_id, a); }
1.75 - };
1.76 -
1.77 - int node_id;
1.78 - int edge_id;
1.79 - int _node_num;
1.80 - int _edge_num;
1.81 -
1.82 - node_item* _first_node;
1.83 - node_item* _last_node;
1.84 -
1.85 - class node_item {
1.86 - friend class ListGraph;
1.87 - template <typename T> friend class NodeMap;
1.88 -
1.89 - friend class NodeIt;
1.90 - friend class EachNodeIt;
1.91 - friend class EdgeIt;
1.92 - friend class EachEdgeIt;
1.93 - friend class OutEdgeIt;
1.94 - friend class InEdgeIt;
1.95 - friend class SymEdgeIt;
1.96 - friend std::ostream& operator<<(std::ostream& os, const NodeIt& i);
1.97 - friend std::ostream& operator<<(std::ostream& os, const EdgeIt& i);
1.98 - //ListGraph* G;
1.99 - int id;
1.100 - edge_item* _first_out_edge;
1.101 - edge_item* _last_out_edge;
1.102 - edge_item* _first_in_edge;
1.103 - edge_item* _last_in_edge;
1.104 - node_item* _next_node;
1.105 - node_item* _prev_node;
1.106 - public:
1.107 - node_item() { }
1.108 - };
1.109 -
1.110 - class edge_item {
1.111 - friend class ListGraph;
1.112 - template <typename T> friend class EdgeMap;
1.113 -
1.114 - friend class NodeIt;
1.115 - friend class EachNodeIt;
1.116 - friend class EdgeIt;
1.117 - friend class EachEdgeIt;
1.118 - friend class OutEdgeIt;
1.119 - friend class InEdgeIt;
1.120 - friend class SymEdgeIt;
1.121 - friend std::ostream& operator<<(std::ostream& os, const EdgeIt& i);
1.122 - //ListGraph* G;
1.123 - int id;
1.124 - node_item* _tail;
1.125 - node_item* _head;
1.126 - edge_item* _next_out;
1.127 - edge_item* _prev_out;
1.128 - edge_item* _next_in;
1.129 - edge_item* _prev_in;
1.130 - public:
1.131 - edge_item() { }
1.132 - };
1.133 -
1.134 - node_item* _add_node() {
1.135 - node_item* p=new node_item;
1.136 - p->id=node_id++;
1.137 - p->_first_out_edge=0;
1.138 - p->_last_out_edge=0;
1.139 - p->_first_in_edge=0;
1.140 - p->_last_in_edge=0;
1.141 - p->_prev_node=_last_node;
1.142 - p->_next_node=0;
1.143 - if (_last_node) _last_node->_next_node=p;
1.144 - _last_node=p;
1.145 - if (!_first_node) _first_node=p;
1.146 -
1.147 - ++_node_num;
1.148 - return p;
1.149 - }
1.150 -
1.151 - edge_item* _add_edge(node_item* _tail, node_item* _head) {
1.152 - edge_item* e=new edge_item;
1.153 - e->id=edge_id++;
1.154 - e->_tail=_tail;
1.155 - e->_head=_head;
1.156 -
1.157 - e->_prev_out=_tail->_last_out_edge;
1.158 - if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
1.159 - _tail->_last_out_edge=e;
1.160 - if (!_tail->_first_out_edge) _tail->_first_out_edge=e;
1.161 - e->_next_out=0;
1.162 -
1.163 - e->_prev_in=_head->_last_in_edge;
1.164 - if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
1.165 - _head->_last_in_edge=e;
1.166 - if (!_head->_first_in_edge) { _head->_first_in_edge=e; }
1.167 - e->_next_in=0;
1.168 -
1.169 - ++_edge_num;
1.170 - return e;
1.171 - }
1.172 -
1.173 - //deletes a node which has no out edge and no in edge
1.174 - void _delete_node(node_item* v) {
1.175 - if (v->_next_node) (v->_next_node)->_prev_node=v->_prev_node; else
1.176 - _last_node=v->_prev_node;
1.177 - if (v->_prev_node) (v->_prev_node)->_next_node=v->_next_node; else
1.178 - _first_node=v->_next_node;
1.179 -
1.180 - delete v;
1.181 - --_node_num;
1.182 - }
1.183 -
1.184 - void _delete_edge(edge_item* e) {
1.185 - if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else
1.186 - (e->_tail)->_last_out_edge=e->_prev_out;
1.187 - if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else
1.188 - (e->_tail)->_first_out_edge=e->_next_out;
1.189 - if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else
1.190 - (e->_head)->_last_in_edge=e->_prev_in;
1.191 - if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else
1.192 - (e->_head)->_first_in_edge=e->_next_in;
1.193 -
1.194 - delete e;
1.195 - --_edge_num;
1.196 - }
1.197 -
1.198 - void _set_tail(edge_item* e, node_item* _tail) {
1.199 - if (e->_next_out) (e->_next_out)->_prev_out=e->_prev_out; else
1.200 - (e->_tail)->_last_out_edge=e->_prev_out;
1.201 - if (e->_prev_out) (e->_prev_out)->_next_out=e->_next_out; else
1.202 - (e->_tail)->_first_out_edge=e->_next_out;
1.203 -
1.204 - e->_tail=_tail;
1.205 -
1.206 - e->_prev_out=_tail->_last_out_edge;
1.207 - if (_tail->_last_out_edge) (_tail->_last_out_edge)->_next_out=e;
1.208 - _tail->_last_out_edge=e;
1.209 - if (!_tail->_first_out_edge) _tail->_first_out_edge=e;
1.210 - e->_next_out=0;
1.211 - }
1.212 -
1.213 - void _set_head(edge_item* e, node_item* _head) {
1.214 - if (e->_next_in) (e->_next_in)->_prev_in=e->_prev_in; else
1.215 - (e->_head)->_last_in_edge=e->_prev_in;
1.216 - if (e->_prev_in) (e->_prev_in)->_next_in=e->_next_in; else
1.217 - (e->_head)->_first_in_edge=e->_next_in;
1.218 -
1.219 - e->_head=_head;
1.220 -
1.221 - e->_prev_in=_head->_last_in_edge;
1.222 - if (_head->_last_in_edge) (_head->_last_in_edge)->_next_in=e;
1.223 - _head->_last_in_edge=e;
1.224 - if (!_head->_first_in_edge) { _head->_first_in_edge=e; }
1.225 - e->_next_in=0;
1.226 - }
1.227 -
1.228 - public:
1.229 -
1.230 - /* default constructor */
1.231 -
1.232 - ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0) { }
1.233 -
1.234 - ~ListGraph() {
1.235 - while (first<EachNodeIt>().valid()) erase(first<EachNodeIt>());
1.236 - }
1.237 -
1.238 - int nodeNum() const { return _node_num; }
1.239 - int edgeNum() const { return _edge_num; }
1.240 -
1.241 - /* functions to construct iterators from the graph, or from each other */
1.242 -
1.243 - //EachNodeIt firstNode() const { return EachNodeIt(*this); }
1.244 - //EachEdgeIt firstEdge() const { return EachEdgeIt(*this); }
1.245 -
1.246 - //OutEdgeIt firstOutEdge(const NodeIt v) const { return OutEdgeIt(v); }
1.247 - //InEdgeIt firstInEdge(const NodeIt v) const { return InEdgeIt(v); }
1.248 - //SymEdgeIt firstSymEdge(const NodeIt v) const { return SymEdgeIt(v); }
1.249 - NodeIt tail(EdgeIt e) const { return e.tailNode(); }
1.250 - NodeIt head(EdgeIt e) const { return e.headNode(); }
1.251 -
1.252 - NodeIt aNode(const OutEdgeIt& e) const { return e.aNode(); }
1.253 - NodeIt aNode(const InEdgeIt& e) const { return e.aNode(); }
1.254 - NodeIt aNode(const SymEdgeIt& e) const { return e.aNode(); }
1.255 -
1.256 - NodeIt bNode(const OutEdgeIt& e) const { return e.bNode(); }
1.257 - NodeIt bNode(const InEdgeIt& e) const { return e.bNode(); }
1.258 - NodeIt bNode(const SymEdgeIt& e) const { return e.bNode(); }
1.259 -
1.260 - //NodeIt invalid_node() { return NodeIt(); }
1.261 - //EdgeIt invalid_edge() { return EdgeIt(); }
1.262 - //OutEdgeIt invalid_out_edge() { return OutEdgeIt(); }
1.263 - //InEdgeIt invalid_in_edge() { return InEdgeIt(); }
1.264 - //SymEdgeIt invalid_sym_edge() { return SymEdgeIt(); }
1.265 -
1.266 - /* same methods in other style */
1.267 - /* for experimental purpose */
1.268 -
1.269 - EachNodeIt& getFirst(EachNodeIt& v) const {
1.270 - v=EachNodeIt(*this); return v; }
1.271 - EachEdgeIt& getFirst(EachEdgeIt& e) const {
1.272 - e=EachEdgeIt(*this); return e; }
1.273 - OutEdgeIt& getFirst(OutEdgeIt& e, NodeIt v) const {
1.274 - e=OutEdgeIt(v); return e; }
1.275 - InEdgeIt& getFirst(InEdgeIt& e, NodeIt v) const {
1.276 - e=InEdgeIt(v); return e; }
1.277 - SymEdgeIt& getFirst(SymEdgeIt& e, NodeIt v) const {
1.278 - e=SymEdgeIt(v); return e; }
1.279 - //void getTail(NodeIt& n, const EdgeIt& e) const { n=tail(e); }
1.280 - //void getHead(NodeIt& n, const EdgeIt& e) const { n=head(e); }
1.281 -
1.282 - //void getANode(NodeIt& n, const OutEdgeIt& e) const { n=e.aNode(); }
1.283 - //void getANode(NodeIt& n, const InEdgeIt& e) const { n=e.aNode(); }
1.284 - //void getANode(NodeIt& n, const SymEdgeIt& e) const { n=e.aNode(); }
1.285 - //void getBNode(NodeIt& n, const OutEdgeIt& e) const { n=e.bNode(); }
1.286 - //void getBNode(NodeIt& n, const InEdgeIt& e) const { n=e.bNode(); }
1.287 - //void getBNode(NodeIt& n, const SymEdgeIt& e) const { n=e.bNode(); }
1.288 - //void get_invalid(NodeIt& n) { n=NodeIt(); }
1.289 - //void get_invalid(EdgeIt& e) { e=EdgeIt(); }
1.290 - //void get_invalid(OutEdgeIt& e) { e=OutEdgeIt(); }
1.291 - //void get_invalid(InEdgeIt& e) { e=InEdgeIt(); }
1.292 - //void get_invalid(SymEdgeIt& e) { e=SymEdgeIt(); }
1.293 -
1.294 - template< typename It >
1.295 - It first() const {
1.296 - It e;
1.297 - getFirst(e);
1.298 - return e;
1.299 - }
1.300 -
1.301 - template< typename It >
1.302 - It first(NodeIt v) const {
1.303 - It e;
1.304 - getFirst(e, v);
1.305 - return e;
1.306 - }
1.307 -
1.308 - bool valid(NodeIt n) const { return n.valid(); }
1.309 - bool valid(EdgeIt e) const { return e.valid(); }
1.310 -
1.311 - template <typename It> It getNext(It it) const {
1.312 - It tmp(it); return next(tmp); }
1.313 - template <typename It> It& next(It& it) const { return ++it; }
1.314 -
1.315 -
1.316 - /* for getting id's of graph objects */
1.317 - /* these are important for the implementation of property vectors */
1.318 -
1.319 - int id(NodeIt v) const { return v.node->id; }
1.320 - int id(EdgeIt e) const { return e.edge->id; }
1.321 -
1.322 - /* adding nodes and edges */
1.323 -
1.324 - NodeIt addNode() { return NodeIt(_add_node()); }
1.325 - EdgeIt addEdge(NodeIt u, NodeIt v) {
1.326 - return EdgeIt(_add_edge(u.node, v.node));
1.327 - }
1.328 -
1.329 - void erase(NodeIt i) {
1.330 - while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
1.331 - while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
1.332 - _delete_node(i.node);
1.333 - }
1.334 -
1.335 - void erase(EdgeIt e) { _delete_edge(e.edge); }
1.336 -
1.337 - void clear() {
1.338 - while (first<EachNodeIt>().valid()) erase(first<EachNodeIt>());
1.339 - }
1.340 -
1.341 - void setTail(EdgeIt e, NodeIt tail) {
1.342 - _set_tail(e.edge, tail.node);
1.343 - }
1.344 -
1.345 - void setHead(EdgeIt e, NodeIt head) {
1.346 - _set_head(e.edge, head.node);
1.347 - }
1.348 -
1.349 - /* stream operations, for testing purpose */
1.350 -
1.351 - friend std::ostream& operator<<(std::ostream& os, const NodeIt& i) {
1.352 - os << i.node->id; return os;
1.353 - }
1.354 - friend std::ostream& operator<<(std::ostream& os, const EdgeIt& i) {
1.355 - os << "(" << i.edge->_tail->id << "--" << i.edge->id << "->" << i.edge->_head->id << ")";
1.356 - return os;
1.357 - }
1.358 -
1.359 - class NodeIt {
1.360 - friend class ListGraph;
1.361 - template <typename T> friend class NodeMap;
1.362 -
1.363 - friend class EdgeIt;
1.364 - friend class OutEdgeIt;
1.365 - friend class InEdgeIt;
1.366 - friend class SymEdgeIt;
1.367 - //public: //FIXME: It is required by op= of EachNodeIt
1.368 - protected:
1.369 - node_item* node;
1.370 - protected:
1.371 - friend int ListGraph::id(NodeIt v) const;
1.372 - public:
1.373 - NodeIt() : node(0) { }
1.374 - NodeIt(node_item* _node) : node(_node) { }
1.375 - bool valid() const { return (node!=0); }
1.376 - //void makeInvalid() { node=0; }
1.377 - friend bool operator==(const NodeIt& u, const NodeIt& v) {
1.378 - return v.node==u.node;
1.379 - }
1.380 - friend bool operator!=(const NodeIt& u, const NodeIt& v) {
1.381 - return v.node!=u.node;
1.382 - }
1.383 - friend std::ostream& operator<<(std::ostream& os, const NodeIt& i);
1.384 - };
1.385 -
1.386 - class EachNodeIt : public NodeIt {
1.387 - friend class ListGraph;
1.388 - //protected:
1.389 - public: //for everybody but marci
1.390 - EachNodeIt(const ListGraph& G) : NodeIt(G._first_node) { }
1.391 - public:
1.392 - EachNodeIt() : NodeIt() { }
1.393 - EachNodeIt(node_item* v) : NodeIt(v) { }
1.394 - EachNodeIt& operator++() { node=node->_next_node; return *this; }
1.395 - //FIXME::
1.396 - // EachNodeIt& operator=(const NodeIt& e)
1.397 - // { node=e.node; return *this; }
1.398 - };
1.399 -
1.400 - class EdgeIt {
1.401 - friend class ListGraph;
1.402 - template <typename T> friend class EdgeMap;
1.403 -
1.404 - friend class NodeIt;
1.405 - friend class EachNodeIt;
1.406 - protected:
1.407 - edge_item* edge;
1.408 - friend int ListGraph::id(EdgeIt e) const;
1.409 - public:
1.410 - EdgeIt() : edge(0) { }
1.411 - //EdgeIt() { }
1.412 - EdgeIt(edge_item* _edge) : edge(_edge) { }
1.413 - bool valid() const { return (edge!=0); }
1.414 - //void makeInvalid() { edge=0; }
1.415 - friend bool operator==(const EdgeIt& u, const EdgeIt& v) {
1.416 - return v.edge==u.edge;
1.417 - }
1.418 - friend bool operator!=(const EdgeIt& u, const EdgeIt& v) {
1.419 - return v.edge!=u.edge;
1.420 - }
1.421 - protected:
1.422 - NodeIt tailNode() const { return NodeIt(edge->_tail); }
1.423 - NodeIt headNode() const { return NodeIt(edge->_head); }
1.424 - public:
1.425 - friend std::ostream& operator<<(std::ostream& os, const EdgeIt& i);
1.426 - };
1.427 -
1.428 - class EachEdgeIt : public EdgeIt {
1.429 - friend class ListGraph;
1.430 - //protected:
1.431 - public: //for alpar
1.432 - EachEdgeIt(const ListGraph& G) {
1.433 - node_item* v=G._first_node;
1.434 - if (v) edge=v->_first_out_edge; else edge=0;
1.435 - while (v && !edge) { v=v->_next_node; if (v) edge=v->_first_out_edge; }
1.436 - }
1.437 - public:
1.438 - EachEdgeIt() : EdgeIt() { }
1.439 - EachEdgeIt(edge_item* _e) : EdgeIt(_e) { }
1.440 - EachEdgeIt& operator++() {
1.441 - node_item* v=edge->_tail;
1.442 - edge=edge->_next_out;
1.443 - while (v && !edge) { v=v->_next_node; if (v) edge=v->_first_out_edge; }
1.444 - return *this;
1.445 - }
1.446 - };
1.447 -
1.448 - class OutEdgeIt : public EdgeIt {
1.449 - friend class ListGraph;
1.450 - //node_item* v;
1.451 - //protected:
1.452 - public: //for alpar
1.453 - OutEdgeIt(const NodeIt& _v) /*: v(_v.node)*/ { edge=_v.node->_first_out_edge; }
1.454 - public:
1.455 - OutEdgeIt() : EdgeIt()/*, v(0)*/ { }
1.456 - OutEdgeIt(const ListGraph& G, NodeIt _v) /*: v(_v.node)*/ { edge=_v.node->_first_out_edge; }
1.457 - OutEdgeIt& operator++() { edge=edge->_next_out; return *this; }
1.458 - protected:
1.459 - NodeIt aNode() const { return NodeIt(edge->_tail); }
1.460 - NodeIt bNode() const { return NodeIt(edge->_head); }
1.461 - };
1.462 -
1.463 - class InEdgeIt : public EdgeIt {
1.464 - friend class ListGraph;
1.465 - //node_item* v;
1.466 - //protected:
1.467 - public: //for alpar
1.468 - InEdgeIt(const NodeIt& _v) /*: v(_v.node)*/ { edge=_v.node->_first_in_edge; }
1.469 - public:
1.470 - InEdgeIt() : EdgeIt()/*, v(0)*/ { }
1.471 - InEdgeIt(const ListGraph& G, NodeIt _v) /*: v(_v.node)*/ { edge=_v.node->_first_in_edge; }
1.472 - InEdgeIt& operator++() { edge=edge->_next_in; return *this; }
1.473 - protected:
1.474 - NodeIt aNode() const { return NodeIt(edge->_head); }
1.475 - NodeIt bNode() const { return NodeIt(edge->_tail); }
1.476 - };
1.477 -
1.478 - class SymEdgeIt : public EdgeIt {
1.479 - friend class ListGraph;
1.480 - bool out_or_in; //1 iff out, 0 iff in
1.481 - //node_item* v;
1.482 - //protected:
1.483 - public: //for alpar
1.484 - SymEdgeIt(const NodeIt& _v) /*: v(_v.node)*/ {
1.485 - out_or_in=1;
1.486 - edge=_v.node->_first_out_edge;
1.487 - if (!edge) { edge=_v.node->_first_in_edge; out_or_in=0; }
1.488 - }
1.489 - public:
1.490 - SymEdgeIt() : EdgeIt() /*, v(0)*/ { }
1.491 - SymEdgeIt(const ListGraph& G, NodeIt _v) /*: v(_v.node)*/ {
1.492 - out_or_in=1;
1.493 - edge=_v.node->_first_out_edge;
1.494 - if (!edge) { edge=_v.node->_first_in_edge; out_or_in=0; }
1.495 - }
1.496 - SymEdgeIt& operator++() {
1.497 - if (out_or_in) {
1.498 - node_item* v=edge->_tail;
1.499 - edge=edge->_next_out;
1.500 - if (!edge) { out_or_in=0; edge=v->_first_in_edge; }
1.501 - } else {
1.502 - edge=edge->_next_in;
1.503 - }
1.504 - return *this;
1.505 - }
1.506 - protected:
1.507 - NodeIt aNode() const {
1.508 - return (out_or_in) ? NodeIt(edge->_tail) : NodeIt(edge->_head); }
1.509 - NodeIt bNode() const {
1.510 - return (out_or_in) ? NodeIt(edge->_head) : NodeIt(edge->_tail); }
1.511 - };
1.512 -
1.513 - };
1.514 -
1.515 -// template< typename T >
1.516 -// T ListGraph::first() const {
1.517 -// std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl;
1.518 -// return T();
1.519 -// }
1.520 -
1.521 -// template<>
1.522 -// ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const {
1.523 -// return firstNode();
1.524 -// }
1.525 -
1.526 -// template<>
1.527 -// ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const {
1.528 -// return firstEdge();
1.529 -// }
1.530 -
1.531 -// template< typename T >
1.532 -// T ListGraph::first(ListGraph::NodeIt v) const {
1.533 -// std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl;
1.534 -// return T();
1.535 -// }
1.536 -
1.537 -// template<>
1.538 -// ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const {
1.539 -// return firstOutEdge(v);
1.540 -// }
1.541 -
1.542 -// template<>
1.543 -// ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const {
1.544 -// return firstInEdge(v);
1.545 -// }
1.546 -
1.547 -// template<>
1.548 -// ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const {
1.549 -// return firstSymEdge(v);
1.550 -// }
1.551 -
1.552 -
1.553 -} //namespace hugo
1.554 -
1.555 -#endif //LIST_GRAPH_HH