Changeset 986:e997802b855c in lemon-0.x for src/work/deba
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/deba/list_graph.h
r921 r986 44 44 struct EdgeT 45 45 { 46 int head, tail;46 int target, source; 47 47 int prev_in, prev_out; 48 48 int next_in, next_out; … … 105 105 int maxEdgeId() const { return edges.size(); } //FIXME: What is this? 106 106 107 Node tail(Edge e) const { return edges[e.n].tail; }108 Node head(Edge e) const { return edges[e.n].head; }109 110 Node aNode(OutEdgeIt e) const { return edges[e.n]. tail; }111 Node aNode(InEdgeIt e) const { return edges[e.n]. head; }112 113 Node bNode(OutEdgeIt e) const { return edges[e.n]. head; }114 Node bNode(InEdgeIt e) const { return edges[e.n]. tail; }107 Node source(Edge e) const { return edges[e.n].source; } 108 Node target(Edge e) const { return edges[e.n].target; } 109 110 Node aNode(OutEdgeIt e) const { return edges[e.n].source; } 111 Node aNode(InEdgeIt e) const { return edges[e.n].target; } 112 113 Node bNode(OutEdgeIt e) const { return edges[e.n].target; } 114 Node bNode(InEdgeIt e) const { return edges[e.n].source; } 115 115 116 116 NodeIt& first(NodeIt& v) const { … … 152 152 else { 153 153 int n; 154 for(n=nodes[edges[it.n]. head].next;154 for(n=nodes[edges[it.n].target].next; 155 155 n!=-1 && nodes[n].first_in == -1; 156 156 n = nodes[n].next) ; … … 208 208 } 209 209 210 edges[n]. tail = u.n; edges[n].head= v.n;210 edges[n].source = u.n; edges[n].target = v.n; 211 211 212 212 edges[n].next_out = nodes[u.n].first_out; … … 233 233 if(edges[n].prev_in!=-1) 234 234 edges[edges[n].prev_in].next_in = edges[n].next_in; 235 else nodes[edges[n]. head].first_in = edges[n].next_in;235 else nodes[edges[n].target].first_in = edges[n].next_in; 236 236 237 237 if(edges[n].next_out!=-1) … … 239 239 if(edges[n].prev_out!=-1) 240 240 edges[edges[n].prev_out].next_out = edges[n].next_out; 241 else nodes[edges[n]. tail].first_out = edges[n].next_out;241 else nodes[edges[n].source].first_out = edges[n].next_out; 242 242 243 243 edges[n].next_in = first_free_edge;
Note: See TracChangeset
for help on using the changeset viewer.