Changeset 371:164fe3abc024 in lemon-1.2 for lemon
- Timestamp:
- 11/07/08 08:18:37 (16 years ago)
- Branch:
- default
- Parents:
- 369:02bc940cbb0e (diff), 370: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
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/smart_graph.h
r368 r371 306 306 nodes[b._id].first_out=nodes[n._id].first_out; 307 307 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 } 309 311 if(connect) addArc(n,b); 310 312 return b; -
lemon/smart_graph.h
r370 r371 68 68 69 69 typedef True NodeNumTag; 70 typedef True EdgeNumTag;70 typedef True ArcNumTag; 71 71 72 72 int nodeNum() const { return nodes.size(); } … … 467 467 468 468 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; 471 471 } 472 472 … … 483 483 : nodes(), arcs() {} 484 484 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(); } 485 492 486 493 int maxNodeId() const { return nodes.size()-1; }
Note: See TracChangeset
for help on using the changeset viewer.