# HG changeset patch # User Alpar Juttner # Date 1254292603 -7200 # Node ID 10c9c3a35b8319389ac03a1371ae2a27916994ab # Parent 819ca5b50de0c849d6097a3bf933060bbf21404d# Parent 32baeb8e5c8fc2cec7dd167588af17a1777b3c8b Merge diff -r 819ca5b50de0 -r 10c9c3a35b83 lemon/list_graph.h --- a/lemon/list_graph.h Tue Sep 29 10:21:51 2009 +0200 +++ b/lemon/list_graph.h Wed Sep 30 08:36:43 2009 +0200 @@ -120,20 +120,20 @@ void first(Arc& arc) const { int n; for(n = first_node; - n!=-1 && nodes[n].first_in == -1; + n != -1 && nodes[n].first_out == -1; n = nodes[n].next) {} - arc.id = (n == -1) ? -1 : nodes[n].first_in; + arc.id = (n == -1) ? -1 : nodes[n].first_out; } void next(Arc& arc) const { - if (arcs[arc.id].next_in != -1) { - arc.id = arcs[arc.id].next_in; + if (arcs[arc.id].next_out != -1) { + arc.id = arcs[arc.id].next_out; } else { int n; - for(n = nodes[arcs[arc.id].target].next; - n!=-1 && nodes[n].first_in == -1; + for(n = nodes[arcs[arc.id].source].next; + n != -1 && nodes[n].first_out == -1; n = nodes[n].next) {} - arc.id = (n == -1) ? -1 : nodes[n].first_in; + arc.id = (n == -1) ? -1 : nodes[n].first_out; } }