Changeset 710:891f99700ea1 in lemon-0.x for src/hugo/list_graph.h
- Timestamp:
- 07/20/04 11:43:12 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@962
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/list_graph.h
r706 r710 138 138 Node bNode(InEdgeIt e) const { return edges[e.n].tail; } 139 139 140 NodeIt& first(NodeIt& v) const {140 static NodeIt& first(NodeIt& v) const { 141 141 v=NodeIt(*this); return v; } 142 EdgeIt& first(EdgeIt& e) const {142 static EdgeIt& first(EdgeIt& e) const { 143 143 e=EdgeIt(*this); return e; } 144 OutEdgeIt& first(OutEdgeIt& e, const Node v) const {144 static OutEdgeIt& first(OutEdgeIt& e, const Node v) const { 145 145 e=OutEdgeIt(*this,v); return e; } 146 InEdgeIt& first(InEdgeIt& e, const Node v) const {146 static InEdgeIt& first(InEdgeIt& e, const Node v) const { 147 147 e=InEdgeIt(*this,v); return e; } 148 148 … … 153 153 // It first(Node v) const { It e; first(e,v); return e; } 154 154 155 bool valid(Edge e) const { return e.n!=-1; }156 bool valid(Node n) const { return n.n!=-1; }157 158 void setInvalid(Edge &e) { e.n=-1; }159 void setInvalid(Node &n) { n.n=-1; }160 161 template <typename It> It getNext(It it) const155 static bool valid(Edge e) const { return e.n!=-1; } 156 static bool valid(Node n) const { return n.n!=-1; } 157 158 static void setInvalid(Edge &e) { e.n=-1; } 159 static void setInvalid(Node &n) { n.n=-1; } 160 161 template <typename It> static It getNext(It it) const 162 162 { It tmp(it); return next(tmp); } 163 163 … … 184 184 } 185 185 186 int id(Node v) const { return v.n; }187 int id(Edge e) const { return e.n; }186 static int id(Node v) const { return v.n; } 187 static int id(Edge e) const { return e.n; } 188 188 189 189 /// Adds a new node to the graph. … … 628 628 ///Returns the oppositely directed 629 629 ///pair of the edge \c e. 630 Edge opposite(Edge e) const630 static Edge opposite(Edge e) const 631 631 { 632 632 Edge f;
Note: See TracChangeset
for help on using the changeset viewer.