diff -r 597ce92fae73 -r a6f019fa6e7a lemon/list_graph.h --- a/lemon/list_graph.h Thu Nov 17 10:14:55 2005 +0000 +++ b/lemon/list_graph.h Thu Nov 17 10:16:29 2005 +0000 @@ -430,6 +430,22 @@ return b; } + ///Split an edge. + + ///This function splits an edge. First a new node \c b is added to the graph, + ///then the original edge is re-targetes to \c b. Finally an edge + ///from \c b to the original target is added. + ///\return The newly created node. + ///\warning This functionality cannot be used together with the Snapshot + ///feature. + Node split(Edge e) + { + Node b = addNode(); + addEdge(b,target(e)); + changeTarget(e,b); + return b; + } + ///Class to make a snapshot of the graph and to restrore to it later. ///Class to make a snapshot of the graph and to restrore to it later.