COIN-OR::LEMON - Graph Library

Changes in / [740:819ca5b50de0:741:10c9c3a35b83] in lemon-main


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r740 r741  
    121121      int n;
    122122      for(n = first_node;
    123           n!=-1 && nodes[n].first_in == -1;
     123          n != -1 && nodes[n].first_out == -1;
    124124          n = nodes[n].next) {}
    125       arc.id = (n == -1) ? -1 : nodes[n].first_in;
     125      arc.id = (n == -1) ? -1 : nodes[n].first_out;
    126126    }
    127127
    128128    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;
    131131      } else {
    132132        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;
    135135            n = nodes[n].next) {}
    136         arc.id = (n == -1) ? -1 : nodes[n].first_in;
     136        arc.id = (n == -1) ? -1 : nodes[n].first_out;
    137137      }
    138138    }
Note: See TracChangeset for help on using the changeset viewer.