Changes in / [787:819ca5b50de0:788:10c9c3a35b83] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/list_graph.h
r787 r788 121 121 int n; 122 122 for(n = first_node; 123 n !=-1 && nodes[n].first_in== -1;123 n != -1 && nodes[n].first_out == -1; 124 124 n = nodes[n].next) {} 125 arc.id = (n == -1) ? -1 : nodes[n].first_ in;125 arc.id = (n == -1) ? -1 : nodes[n].first_out; 126 126 } 127 127 128 128 void next(Arc& arc) const { 129 if (arcs[arc.id].next_ in!= -1) {130 arc.id = arcs[arc.id].next_ in;129 if (arcs[arc.id].next_out != -1) { 130 arc.id = arcs[arc.id].next_out; 131 131 } else { 132 132 int n; 133 for(n = nodes[arcs[arc.id]. target].next;134 n !=-1 && nodes[n].first_in== -1;133 for(n = nodes[arcs[arc.id].source].next; 134 n != -1 && nodes[n].first_out == -1; 135 135 n = nodes[n].next) {} 136 arc.id = (n == -1) ? -1 : nodes[n].first_ in;136 arc.id = (n == -1) ? -1 : nodes[n].first_out; 137 137 } 138 138 }
Note: See TracChangeset
for help on using the changeset viewer.