[Lemon-commits] [lemon_svn] alpar: r2042 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:43 CET 2006
Author: alpar
Date: Tue Jul 12 18:15:37 2005
New Revision: 2042
Modified:
hugo/trunk/lemon/list_graph.h
Log:
moveSource() -> changeSource()
moveTarget() -> changeTarget()
Modified: hugo/trunk/lemon/list_graph.h
==============================================================================
--- hugo/trunk/lemon/list_graph.h (original)
+++ hugo/trunk/lemon/list_graph.h Tue Jul 12 18:15:37 2005
@@ -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 <tt>Edge</tt>'s and <tt>OutEdge</tt>'s
- ///referencing the moved edge remain
+ ///referencing the changed edge remain
///valid. However <tt>InEdge</tt>'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 <tt>Edge</tt>'s and <tt>InEdge</tt>'s
- ///referencing the moved edge remain
+ ///referencing the changed edge remain
///valid. However <tt>OutEdge</tt>'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 <tt>Edge</tt>'s
- ///referencing the moved edge remain
+ ///referencing the changed edge remain
///valid. However <tt>OutEdge</tt>'s and <tt>InEdge</tt>'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 {
More information about the Lemon-commits
mailing list