Rename markToBottom() to dirtyTopButOne() + better doc (#174)
authorAlpar Juttner <alpar@cs.elte.hu>
Mon, 17 Nov 2008 15:41:15 +0000
changeset 395d916b8995e22
parent 394 1bab3a47be88
child 396 b04e431907bc
Rename markToBottom() to dirtyTopButOne() + better doc (#174)
lemon/elevator.h
     1.1 --- a/lemon/elevator.h	Mon Nov 17 15:41:15 2008 +0000
     1.2 +++ b/lemon/elevator.h	Mon Nov 17 15:41:15 2008 +0000
     1.3 @@ -380,20 +380,19 @@
     1.4        if(new_level>_highest_active) _highest_active=new_level;
     1.5      }
     1.6  
     1.7 -    ///Mark the node as it did not reach the max level
     1.8 +    ///Move an inactive item to the top but one level (in a dirty way).
     1.9  
    1.10 -    ///Mark the node as it did not reach the max level. It sets the
    1.11 -    ///level to the under the max level value. The node will be never
    1.12 -    ///more activated because the push operation from the maximum
    1.13 -    ///level is forbidden in the push-relabel algorithms. The node
    1.14 -    ///should be lifted previously to the top level.
    1.15 -    void markToBottom(Item i) {
    1.16 +    ///This function moves an inactive item to the top but one level.
    1.17 +    ///It makes the underlying datastructure corrupt, so use is only if
    1.18 +    ///you really know what it is for.
    1.19 +    ///\pre The item is on the top level.
    1.20 +    void dirtyTopButOne(Item i) {
    1.21        _level[i] = _max_level - 1;
    1.22      }
    1.23  
    1.24 -    ///Lift all nodes on and above a level to the top (and deactivate them).
    1.25 +    ///Lift all items on and above a level to the top (and deactivate them).
    1.26  
    1.27 -    ///This function lifts all nodes on and above level \c l to \c
    1.28 +    ///This function lifts all items on and above level \c l to \c
    1.29      ///maxLevel(), and also deactivates them.
    1.30      void liftToTop(int l)
    1.31      {
    1.32 @@ -749,7 +748,7 @@
    1.33      ///Lift the highest active to top.
    1.34  
    1.35      ///Lift the item returned by highestActive() to the top level and
    1.36 -    ///deactivates the node.
    1.37 +    ///deactivates the item.
    1.38      ///
    1.39      void liftHighestActiveToTop() {
    1.40        Item i = _first[_highest_active];
    1.41 @@ -897,20 +896,19 @@
    1.42        }
    1.43      }
    1.44  
    1.45 -    ///Mark the node as it did not reach the max level
    1.46 +    ///Move an inactive item to the top but one level (in a dirty way).
    1.47  
    1.48 -    ///Mark the node as it did not reach the max level. It sets the
    1.49 -    ///level to the under the max level value. The node will be never
    1.50 -    ///more activated because the push operation from the maximum
    1.51 -    ///level is forbidden in the push-relabel algorithms. The node
    1.52 -    ///should be lifted previously to the top level.
    1.53 -    void markToBottom(Item i) {
    1.54 +    ///This function moves an inactive item to the top but one level.
    1.55 +    ///It makes the underlying datastructure corrupt, so use is only if
    1.56 +    ///you really know what it is for.
    1.57 +    ///\pre The item is on the top level.
    1.58 +    void dirtyTopButOne(Item i) {
    1.59        _level.set(i, _max_level - 1);
    1.60      }
    1.61  
    1.62 -    ///Lift all nodes on and above a level to the top (and deactivate them).
    1.63 +    ///Lift all items on and above a level to the top (and deactivate them).
    1.64  
    1.65 -    ///This function lifts all nodes on and above level \c l to \c
    1.66 +    ///This function lifts all items on and above level \c l to \c
    1.67      ///maxLevel(), and also deactivates them.
    1.68      void liftToTop(int l)  {
    1.69        for (int i = l + 1; _first[i] != INVALID; ++i) {