1.1 --- a/lemon/elevator.h Tue Nov 20 21:40:55 2007 +0000
1.2 +++ b/lemon/elevator.h Wed Nov 21 13:34:38 2007 +0000
1.3 @@ -50,11 +50,13 @@
1.4 template<class Graph, class Item>
1.5 class Elevator
1.6 {
1.7 - private:
1.8 + public:
1.9
1.10 typedef Item Key;
1.11 typedef int Value;
1.12
1.13 + private:
1.14 +
1.15 typedef typename std::vector<Item>::iterator Vit;
1.16 typedef typename ItemSetTraits<Graph,Item>::template Map<Vit>::Type VitMap;
1.17 typedef typename ItemSetTraits<Graph,Item>::template Map<int>::Type IntMap;
1.18 @@ -377,6 +379,16 @@
1.19 _level[i]=new_level;
1.20 if(new_level>_highest_active) _highest_active=new_level;
1.21 }
1.22 +
1.23 + ///Mark the node as it did not reach the max level
1.24 +
1.25 + ///Mark the node as it did not reach the max level. It sets the
1.26 + ///level of the node to a low value, which is not connected to the
1.27 + ///real levels of elevator. The node should be lifted previously
1.28 + ///to the top level.
1.29 + void markToBottom(Item i) {
1.30 + _level[i] = - _max_level;
1.31 + }
1.32
1.33 ///Lift all nodes on and above a level to the top (and deactivate them).
1.34
1.35 @@ -491,11 +503,13 @@
1.36 ///Graph::Edge, Graph::UEdge)
1.37 template <class Graph, class Item>
1.38 class LinkedElevator {
1.39 - private:
1.40 + public:
1.41
1.42 typedef Item Key;
1.43 typedef int Value;
1.44
1.45 + private:
1.46 +
1.47 typedef typename ItemSetTraits<Graph,Item>::
1.48 template Map<Item>::Type ItemMap;
1.49 typedef typename ItemSetTraits<Graph,Item>::
1.50 @@ -882,6 +896,16 @@
1.51 }
1.52 }
1.53
1.54 + ///Mark the node as it did not reach the max level
1.55 +
1.56 + ///Mark the node as it did not reach the max level. It sets the
1.57 + ///level of the node to a low value, which is not connected to the
1.58 + ///real levels of elevator. The node should be lifted previously
1.59 + ///to the top level.
1.60 + void markToBottom(Item i) {
1.61 + _level[i] = - _max_level;
1.62 + }
1.63 +
1.64 ///Lift all nodes on and above a level to the top (and deactivate them).
1.65
1.66 ///This function lifts all nodes on and above level \c l to \c