# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1226936475 0
# Node ID d916b8995e223181cb0fe17a1082adf7ff1a1b57
# Parent  1bab3a47be88177b0ed7fe1d2845d42e9cc2f65f
Rename markToBottom() to dirtyTopButOne() + better doc (#174)

diff -r 1bab3a47be88 -r d916b8995e22 lemon/elevator.h
--- a/lemon/elevator.h	Mon Nov 17 15:41:15 2008 +0000
+++ b/lemon/elevator.h	Mon Nov 17 15:41:15 2008 +0000
@@ -380,20 +380,19 @@
       if(new_level>_highest_active) _highest_active=new_level;
     }
 
-    ///Mark the node as it did not reach the max level
+    ///Move an inactive item to the top but one level (in a dirty way).
 
-    ///Mark the node as it did not reach the max level. It sets the
-    ///level to the under the max level value. The node will be never
-    ///more activated because the push operation from the maximum
-    ///level is forbidden in the push-relabel algorithms. The node
-    ///should be lifted previously to the top level.
-    void markToBottom(Item i) {
+    ///This function moves an inactive item to the top but one level.
+    ///It makes the underlying datastructure corrupt, so use is only if
+    ///you really know what it is for.
+    ///\pre The item is on the top level.
+    void dirtyTopButOne(Item i) {
       _level[i] = _max_level - 1;
     }
 
-    ///Lift all nodes on and above a level to the top (and deactivate them).
+    ///Lift all items on and above a level to the top (and deactivate them).
 
-    ///This function lifts all nodes on and above level \c l to \c
+    ///This function lifts all items on and above level \c l to \c
     ///maxLevel(), and also deactivates them.
     void liftToTop(int l)
     {
@@ -749,7 +748,7 @@
     ///Lift the highest active to top.
 
     ///Lift the item returned by highestActive() to the top level and
-    ///deactivates the node.
+    ///deactivates the item.
     ///
     void liftHighestActiveToTop() {
       Item i = _first[_highest_active];
@@ -897,20 +896,19 @@
       }
     }
 
-    ///Mark the node as it did not reach the max level
+    ///Move an inactive item to the top but one level (in a dirty way).
 
-    ///Mark the node as it did not reach the max level. It sets the
-    ///level to the under the max level value. The node will be never
-    ///more activated because the push operation from the maximum
-    ///level is forbidden in the push-relabel algorithms. The node
-    ///should be lifted previously to the top level.
-    void markToBottom(Item i) {
+    ///This function moves an inactive item to the top but one level.
+    ///It makes the underlying datastructure corrupt, so use is only if
+    ///you really know what it is for.
+    ///\pre The item is on the top level.
+    void dirtyTopButOne(Item i) {
       _level.set(i, _max_level - 1);
     }
 
-    ///Lift all nodes on and above a level to the top (and deactivate them).
+    ///Lift all items on and above a level to the top (and deactivate them).
 
-    ///This function lifts all nodes on and above level \c l to \c
+    ///This function lifts all items on and above level \c l to \c
     ///maxLevel(), and also deactivates them.
     void liftToTop(int l)  {
       for (int i = l + 1; _first[i] != INVALID; ++i) {