Index: lemon/list_graph.h
===================================================================
--- lemon/list_graph.h (revision 234)
+++ lemon/list_graph.h (revision 235)
@@ -396,7 +396,7 @@
bool valid(Arc a) const { return Parent::valid(a); }
- /// Change the target of \c e to \c n
-
- /// Change the target of \c e to \c n
+ /// Change the target of \c a to \c n
+
+ /// Change the target of \c a to \c n
///
///\note The ArcIts and OutArcIts referencing
@@ -406,19 +406,19 @@
///\warning This functionality cannot be used together with the Snapshot
///feature.
- void changeTarget(Arc e, Node n) {
- Parent::changeTarget(e,n);
- }
- /// Change the source of \c e to \c n
-
- /// Change the source of \c e to \c n
- ///
- ///\note The ArcIts and InArcIts referencing
- ///the changed arc remain valid. However OutArcIts are
+ void changeTarget(Arc a, Node n) {
+ Parent::changeTarget(a,n);
+ }
+ /// Change the source of \c a to \c n
+
+ /// Change the source of \c a to \c n
+ ///
+ ///\note The InArcIts referencing the changed arc remain
+ ///valid. However the ArcIts and OutArcIts are
///invalidated.
///
///\warning This functionality cannot be used together with the Snapshot
///feature.
- void changeSource(Arc e, Node n) {
- Parent::changeSource(e,n);
+ void changeSource(Arc a, Node n) {
+ Parent::changeSource(a,n);
}
@@ -1115,5 +1115,5 @@
protected:
- void changeTarget(Edge e, Node n) {
+ void changeV(Edge e, Node n) {
if(arcs[2 * e.id].next_out != -1) {
arcs[arcs[2 * e.id].next_out].prev_out = arcs[2 * e.id].prev_out;
@@ -1136,5 +1136,5 @@
}
- void changeSource(Edge e, Node n) {
+ void changeU(Edge e, Node n) {
if(arcs[(2 * e.id) | 1].next_out != -1) {
arcs[arcs[(2 * e.id) | 1].next_out].prev_out =
@@ -1259,64 +1259,30 @@
/// added to the graph.
bool valid(Edge e) const { return Parent::valid(e); }
- /// \brief Change the source of \c e to \c n
- ///
- /// This function changes the source of \c e to \c n.
- ///
- ///\note The ArcIts and InArcIts
- ///referencing the changed arc remain
- ///valid. However OutArcIts are invalidated.
+ /// \brief Change the end \c u of \c e to \c n
+ ///
+ /// This function changes the end \c u of \c e to node \c n.
+ ///
+ ///\note The EdgeIts and ArcIts referencing the
+ ///changed edge are invalidated and if the changed node is the
+ ///base node of an iterator then this iterator is also
+ ///invalidated.
///
///\warning This functionality cannot be used together with the
///Snapshot feature.
- void changeSource(Edge e, Node n) {
- Parent::changeSource(e,n);
- }
- /// \brief Change the target of \c e to \c n
- ///
- /// This function changes the target of \c e to \c n.
- ///
- /// \note The ArcIts referencing the changed arc remain
- /// valid. However the other iterators may be invalidated.
+ void changeU(Edge e, Node n) {
+ Parent::changeU(e,n);
+ }
+ /// \brief Change the end \c v of \c e to \c n
+ ///
+ /// This function changes the end \c v of \c e to \c n.
+ ///
+ ///\note The EdgeIts referencing the changed edge remain
+ ///valid, however ArcIts and if the changed node is the
+ ///base node of an iterator then this iterator is invalidated.
///
///\warning This functionality cannot be used together with the
///Snapshot feature.
- void changeTarget(Edge e, Node n) {
- Parent::changeTarget(e,n);
- }
- /// \brief Change the source of \c e to \c n
- ///
- /// This function changes the source of \c e to \c n.
- /// It also changes the proper node of the represented edge.
- ///
- ///\note The ArcIts and InArcIts
- ///referencing the changed arc remain
- ///valid. However OutArcIts are invalidated.
- ///
- ///\warning This functionality cannot be used together with the
- ///Snapshot feature.
- void changeSource(Arc e, Node n) {
- if (Parent::direction(e)) {
- Parent::changeSource(e,n);
- } else {
- Parent::changeTarget(e,n);
- }
- }
- /// \brief Change the target of \c e to \c n
- ///
- /// This function changes the target of \c e to \c n.
- /// It also changes the proper node of the represented edge.
- ///
- ///\note The ArcIts and OutArcIts
- ///referencing the changed arc remain
- ///valid. However InArcIts are invalidated.
- ///
- ///\warning This functionality cannot be used together with the
- ///Snapshot feature.
- void changeTarget(Arc e, Node n) {
- if (Parent::direction(e)) {
- Parent::changeTarget(e,n);
- } else {
- Parent::changeSource(e,n);
- }
+ void changeV(Edge e, Node n) {
+ Parent::changeV(e,n);
}
/// \brief Contract two nodes.
@@ -1338,8 +1304,8 @@
if (r && runningNode(e) == a) {
erase(e);
- } else if (source(e) == b) {
- changeSource(e, a);
+ } else if (u(e) == b) {
+ changeU(e, a);
} else {
- changeTarget(e, a);
+ changeV(e, a);
}
e = f;