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