# HG changeset patch # User alpar # Date 1121184937 0 # Node ID 3fcb8ae9cea1abc2afe759008614895a951e1bc0 # Parent e8378402f97ea54f216cdcaa3d3092e247a0e592 moveSource() -> changeSource() moveTarget() -> changeTarget() diff -r e8378402f97e -r 3fcb8ae9cea1 lemon/list_graph.h --- a/lemon/list_graph.h Tue Jul 12 13:36:01 2005 +0000 +++ b/lemon/list_graph.h Tue Jul 12 16:15:37 2005 +0000 @@ -275,7 +275,7 @@ } protected: - void _moveTarget(Edge e, Node n) + void _changeTarget(Edge e, Node n) { if(edges[e.id].next_in != -1) edges[edges[e.id].next_in].prev_in = edges[e.id].prev_in; @@ -287,7 +287,7 @@ edges[e.id].next_in = nodes[n.id].first_in; nodes[n.id].first_in = e.id; } - void _moveSource(Edge e, Node n) + void _changeSource(Edge e, Node n) { if(edges[e.id].next_out != -1) edges[edges[e.id].next_out].prev_out = edges[e.id].prev_out; @@ -324,32 +324,32 @@ class ListGraph : public ErasableListGraphBase { public: - /// Moves the target of \c e to \c n + /// Changes the target of \c e to \c n - /// Moves the target of \c e to \c n + /// Changes the target of \c e to \c n /// ///\note The Edge's and OutEdge's - ///referencing the moved edge remain + ///referencing the changed edge remain ///valid. However InEdge's are invalidated. - void moveTarget(Edge e, Node n) { _moveTarget(e,n); } - /// Moves the source of \c e to \c n + void changeTarget(Edge e, Node n) { _changeTarget(e,n); } + /// Changes the source of \c e to \c n - /// Moves the source of \c e to \c n + /// Changes the source of \c e to \c n /// ///\note The Edge's and InEdge's - ///referencing the moved edge remain + ///referencing the changed edge remain ///valid. However OutEdge's are invalidated. - void moveSource(Edge e, Node n) { _moveSource(e,n); } + void changeSource(Edge e, Node n) { _changeSource(e,n); } /// Invert the direction of an edge. ///\note The Edge's - ///referencing the moved edge remain + ///referencing the changed edge remain ///valid. However OutEdge's and InEdge's are invalidated. void reverseEdge(Edge e) { Node t=target(e); - _moveTarget(e,source(e)); - _moveSource(e,t); + _changeTarget(e,source(e)); + _changeSource(e,t); } ///Using this it possible to avoid the superfluous memory allocation. @@ -377,14 +377,14 @@ OutEdgeIt f=e; ++f; if(r && target(e)==a) erase(e); - else moveSource(e,a); + else changeSource(e,a); e=f; } for(InEdgeIt e(*this,b);e!=INVALID;) { InEdgeIt f=e; ++f; if(r && source(e)==a) erase(e); - else moveTarget(e,a); + else changeTarget(e,a); e=f; } erase(b); @@ -411,7 +411,7 @@ for(OutEdgeIt e(*this,n);e!=INVALID;) { OutEdgeIt f=e; ++f; - moveSource(e,b); + changeSource(e,b); e=f; } if(connect) addEdge(n,b); @@ -559,7 +559,7 @@ /// ///\sa concept::UndirGraph. /// - ///\todo SnapShot, reverseEdge(), moveTarget(), moveSource(), contract() + ///\todo SnapShot, reverseEdge(), changeTarget(), changeSource(), contract() ///haven't been implemented yet. /// class UndirListGraph : public ErasableUndirListGraphBase {