Changeset 738:456fa5bc3256 in lemon-1.2 for lemon
- Timestamp:
- 08/23/09 11:13:21 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/list_graph.h
r736 r738 33 33 namespace lemon { 34 34 35 class ListDigraph; 36 35 37 class ListDigraphBase { 36 38 … … 63 65 class Node { 64 66 friend class ListDigraphBase; 67 friend class ListDigraph; 65 68 protected: 66 69 … … 78 81 class Arc { 79 82 friend class ListDigraphBase; 83 friend class ListDigraph; 80 84 protected: 81 85 … … 468 472 ///\return The newly created node. 469 473 /// 470 ///\note \c ArcIt and \c OutArcIt iterators referencing the outgoing 471 ///arcs of node \c n are invalidated. Other iterators remain valid. 474 ///\note All iterators remain valid. 472 475 /// 473 476 ///\warning This functionality cannot be used together with the … … 475 478 Node split(Node n, bool connect = true) { 476 479 Node b = addNode(); 477 for(OutArcIt e(*this,n);e!=INVALID;) { 478 OutArcIt f=e; 479 ++f; 480 changeSource(e,b); 481 e=f; 480 nodes[b.id].first_out=nodes[n.id].first_out; 481 nodes[n.id].first_out=-1; 482 for(int i=nodes[b.id].first_out; i!=-1; i=arcs[i].next_out) { 483 arcs[i].source=b.id; 482 484 } 483 485 if (connect) addArc(n,b);
Note: See TracChangeset
for help on using the changeset viewer.