COIN-OR::LEMON - Graph Library

Changeset 384:164fe3abc024 in lemon


Ignore:
Timestamp:
11/07/08 08:18:37 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
381:02bc940cbb0e (diff), 382:00c8843d491d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/smart_graph.h

    r380 r384  
    306306      nodes[b._id].first_out=nodes[n._id].first_out;
    307307      nodes[n._id].first_out=-1;
    308       for(int i=nodes[b._id].first_out;i!=-1;i++) arcs[i].source=b._id;
     308      for(int i=nodes[b._id].first_out; i!=-1; i=arcs[i].next_out) {
     309        arcs[i].source=b._id;
     310      }
    309311      if(connect) addArc(n,b);
    310312      return b;
  • lemon/smart_graph.h

    r382 r384  
    6868
    6969    typedef True NodeNumTag;
    70     typedef True EdgeNumTag;
     70    typedef True ArcNumTag;
    7171
    7272    int nodeNum() const { return nodes.size(); }
     
    467467
    468468    public:
    469       operator Edge() const { 
    470         return _id != -1 ? edgeFromId(_id / 2) : INVALID; 
     469      operator Edge() const {
     470        return _id != -1 ? edgeFromId(_id / 2) : INVALID;
    471471      }
    472472
     
    483483      : nodes(), arcs() {}
    484484
     485    typedef True NodeNumTag;
     486    typedef True EdgeNumTag;
     487    typedef True ArcNumTag;
     488
     489    int nodeNum() const { return nodes.size(); }
     490    int edgeNum() const { return arcs.size() / 2; }
     491    int arcNum() const { return arcs.size(); }
    485492
    486493    int maxNodeId() const { return nodes.size()-1; }
Note: See TracChangeset for help on using the changeset viewer.