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