390 erase(b); |
390 erase(b); |
391 } |
391 } |
392 |
392 |
393 ///Split a node. |
393 ///Split a node. |
394 |
394 |
395 ///This function splits a node. First new node is added to the graph, then |
395 ///This function splits a node. First a new node is added to the graph, |
396 ///the source of each outgoing edge of \c n is moved to this new node. |
396 ///then the source of each outgoing edge of \c n is moved to this new node. |
397 ///If \c connect is \c true (this is the default value), then a new edge |
397 ///If \c connect is \c true (this is the default value), then a new edge |
398 ///from \c n to the newly created node is also added. |
398 ///from \c n to the newly created node is also added. |
399 ///\return The newly created node. |
399 ///\return The newly created node. |
400 /// |
400 /// |
401 ///\note The <tt>Edge</tt>s |
401 ///\note The <tt>Edge</tt>s |
402 ///referencing a moved edge remain |
402 ///referencing a moved edge remain |
403 ///valid. However <tt>InEdge</tt>'s and <tt>OutEdge</tt>'s |
403 ///valid. However <tt>InEdge</tt>'s and <tt>OutEdge</tt>'s |
404 ///may be invalidated. |
404 ///may be invalidated. |
|
405 ///\warning This functionality cannot be used together with the SnapShot |
|
406 ///feature. |
405 ///\todo It could be implemented in a bit faster way. |
407 ///\todo It could be implemented in a bit faster way. |
406 Node split(Node n, bool connect = true) |
408 Node split(Node n, bool connect = true) |
407 { |
409 { |
408 Node b = addNode(); |
410 Node b = addNode(); |
409 for(OutEdgeIt e(*this,n);e!=INVALID;) { |
411 for(OutEdgeIt e(*this,n);e!=INVALID;) { |