# HG changeset patch # User deba # Date 1195669160 0 # Node ID 6148e83636b91c18473a6722ca15824e4a8b1056 # Parent a7376f7ed8991a315a1f2becec645d6167dfe433 Better solution diff -r a7376f7ed899 -r 6148e83636b9 lemon/elevator.h --- a/lemon/elevator.h Wed Nov 21 13:35:10 2007 +0000 +++ b/lemon/elevator.h Wed Nov 21 18:19:20 2007 +0000 @@ -383,11 +383,12 @@ ///Mark the node as it did not reach the max level ///Mark the node as it did not reach the max level. It sets the - ///level of the node to a low value, which is not connected to the - ///real levels of elevator. The node should be lifted previously - ///to the top level. + ///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) { - _level[i] = - _max_level; + _level[i] = _max_level - 1; } ///Lift all nodes on and above a level to the top (and deactivate them). @@ -899,11 +900,12 @@ ///Mark the node as it did not reach the max level ///Mark the node as it did not reach the max level. It sets the - ///level of the node to a low value, which is not connected to the - ///real levels of elevator. The node should be lifted previously - ///to the top level. + ///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) { - _level[i] = - _max_level; + _level[i] = _max_level - 1; } ///Lift all nodes on and above a level to the top (and deactivate them).