Changeset 786:32baeb8e5c8f in lemon
 Timestamp:
 09/28/09 12:48:44 (14 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/list_graph.h
r664 r786 117 117 int n; 118 118 for(n = first_node; 119 n !=1 && nodes[n].first_in== 1;119 n != 1 && nodes[n].first_out == 1; 120 120 n = nodes[n].next) {} 121 arc.id = (n == 1) ? 1 : nodes[n].first_ in;121 arc.id = (n == 1) ? 1 : nodes[n].first_out; 122 122 } 123 123 124 124 void next(Arc& arc) const { 125 if (arcs[arc.id].next_ in!= 1) {126 arc.id = arcs[arc.id].next_ in;125 if (arcs[arc.id].next_out != 1) { 126 arc.id = arcs[arc.id].next_out; 127 127 } else { 128 128 int n; 129 for(n = nodes[arcs[arc.id]. target].next;130 n !=1 && nodes[n].first_in== 1;129 for(n = nodes[arcs[arc.id].source].next; 130 n != 1 && nodes[n].first_out == 1; 131 131 n = nodes[n].next) {} 132 arc.id = (n == 1) ? 1 : nodes[n].first_ in;132 arc.id = (n == 1) ? 1 : nodes[n].first_out; 133 133 } 134 134 }
Note: See TracChangeset
for help on using the changeset viewer.