Put some "static"'s.
1.1 --- a/src/hugo/full_graph.h Mon Jul 19 13:32:28 2004 +0000
1.2 +++ b/src/hugo/full_graph.h Tue Jul 20 09:43:12 2004 +0000
1.3 @@ -77,8 +77,8 @@
1.4 InEdgeIt& first(InEdgeIt& e, const Node v) const {
1.5 e=InEdgeIt(*this,v); return e; }
1.6
1.7 - bool valid(Edge e) const { return e.n!=-1; }
1.8 - bool valid(Node n) const { return n.n!=-1; }
1.9 + static bool valid(Edge e) const { return e.n!=-1; }
1.10 + static bool valid(Node n) const { return n.n!=-1; }
1.11
1.12 template <typename It> It getNext(It it) const
1.13 { It tmp(it); return next(tmp); }
1.14 @@ -91,10 +91,10 @@
1.15 { it.n+=NodeNum; if(it.n>=EdgeNum) it.n=-1; return it; }
1.16 InEdgeIt& next(InEdgeIt& it) const
1.17 { if(!((++it.n)%NodeNum)) it.n=-1; return it; }
1.18 - EdgeIt& next(EdgeIt& it) const { --it.n; return it; }
1.19 + static EdgeIt& next(EdgeIt& it) const { --it.n; return it; }
1.20
1.21 - int id(Node v) const { return v.n; }
1.22 - int id(Edge e) const { return e.n; }
1.23 + static int id(Node v) const { return v.n; }
1.24 + static int id(Edge e) const { return e.n; }
1.25
1.26 class Node {
1.27 friend class FullGraph;
2.1 --- a/src/hugo/list_graph.h Mon Jul 19 13:32:28 2004 +0000
2.2 +++ b/src/hugo/list_graph.h Tue Jul 20 09:43:12 2004 +0000
2.3 @@ -137,13 +137,13 @@
2.4 Node bNode(OutEdgeIt e) const { return edges[e.n].head; }
2.5 Node bNode(InEdgeIt e) const { return edges[e.n].tail; }
2.6
2.7 - NodeIt& first(NodeIt& v) const {
2.8 + static NodeIt& first(NodeIt& v) const {
2.9 v=NodeIt(*this); return v; }
2.10 - EdgeIt& first(EdgeIt& e) const {
2.11 + static EdgeIt& first(EdgeIt& e) const {
2.12 e=EdgeIt(*this); return e; }
2.13 - OutEdgeIt& first(OutEdgeIt& e, const Node v) const {
2.14 + static OutEdgeIt& first(OutEdgeIt& e, const Node v) const {
2.15 e=OutEdgeIt(*this,v); return e; }
2.16 - InEdgeIt& first(InEdgeIt& e, const Node v) const {
2.17 + static InEdgeIt& first(InEdgeIt& e, const Node v) const {
2.18 e=InEdgeIt(*this,v); return e; }
2.19
2.20 // template< typename It >
2.21 @@ -152,13 +152,13 @@
2.22 // template< typename It >
2.23 // It first(Node v) const { It e; first(e,v); return e; }
2.24
2.25 - bool valid(Edge e) const { return e.n!=-1; }
2.26 - bool valid(Node n) const { return n.n!=-1; }
2.27 + static bool valid(Edge e) const { return e.n!=-1; }
2.28 + static bool valid(Node n) const { return n.n!=-1; }
2.29
2.30 - void setInvalid(Edge &e) { e.n=-1; }
2.31 - void setInvalid(Node &n) { n.n=-1; }
2.32 + static void setInvalid(Edge &e) { e.n=-1; }
2.33 + static void setInvalid(Node &n) { n.n=-1; }
2.34
2.35 - template <typename It> It getNext(It it) const
2.36 + template <typename It> static It getNext(It it) const
2.37 { It tmp(it); return next(tmp); }
2.38
2.39 NodeIt& next(NodeIt& it) const {
2.40 @@ -183,8 +183,8 @@
2.41 return it;
2.42 }
2.43
2.44 - int id(Node v) const { return v.n; }
2.45 - int id(Edge e) const { return e.n; }
2.46 + static int id(Node v) const { return v.n; }
2.47 + static int id(Edge e) const { return e.n; }
2.48
2.49 /// Adds a new node to the graph.
2.50
2.51 @@ -627,7 +627,7 @@
2.52
2.53 ///Returns the oppositely directed
2.54 ///pair of the edge \c e.
2.55 - Edge opposite(Edge e) const
2.56 + static Edge opposite(Edge e) const
2.57 {
2.58 Edge f;
2.59 f.idref() = e.idref() - 2*(e.idref()%2) + 1;