Index: lemon/elevator.h
===================================================================
--- lemon/elevator.h	(revision 397)
+++ lemon/elevator.h	(revision 398)
@@ -28,5 +28,6 @@
 ///
 
-#include <test/test_tools.h>
+#include <lemon/bits/traits.h>
+
 namespace lemon {
 
@@ -45,7 +46,7 @@
   ///\sa LinkedElevator
   ///
-  ///\param Graph the underlying graph type
+  ///\param Graph Type of the underlying graph.
   ///\param Item Type of the items the data is assigned to (Graph::Node,
-  ///Graph::Edge, Graph::UEdge)
+  ///Graph::Arc, Graph::Edge).
   template<class Graph, class Item>
   class Elevator
@@ -101,13 +102,13 @@
     ///Constructor with given maximum level.
     ///
-    ///\param g The underlying graph
-    ///\param max_level Set the range of the possible labels to
-    ///[0...\c max_level]
-    Elevator(const Graph &g,int max_level) :
-      _g(g),
+    ///\param graph The underlying graph.
+    ///\param max_level The maximum allowed level.
+    ///Set the range of the possible labels to <tt>[0..max_level]</tt>.
+    Elevator(const Graph &graph,int max_level) :
+      _g(graph),
       _max_level(max_level),
       _item_num(_max_level),
-      _where(g),
-      _level(g,0),
+      _where(graph),
+      _level(graph,0),
       _items(_max_level),
       _first(_max_level+2),
@@ -118,13 +119,13 @@
     ///Constructor.
     ///
-    ///\param g The underlying graph
-    ///The range of the possible labels is [0...\c max_level],
+    ///\param graph The underlying graph.
+    ///Set the range of the possible labels to <tt>[0..max_level]</tt>,
     ///where \c max_level is equal to the number of labeled items in the graph.
-    Elevator(const Graph &g) :
-      _g(g),
-      _max_level(countItems<Graph, Item>(g)),
+    Elevator(const Graph &graph) :
+      _g(graph),
+      _max_level(countItems<Graph, Item>(graph)),
       _item_num(_max_level),
-      _where(g),
-      _level(g,0),
+      _where(graph),
+      _level(graph,0),
       _items(_max_level),
       _first(_max_level+2),
@@ -168,5 +169,5 @@
       return _first[l+1]-_first[l];
     }
-    ///Return true if the level is empty.
+    ///Return true if level \c l is empty.
     bool emptyLevel(int l) const
     {
@@ -183,5 +184,5 @@
       return _last_active[l]-_first[l]+1;
     }
-    ///Return true if there is not active item on level \c l.
+    ///Return true if there is no active item on level \c l.
     bool activeFree(int l) const
     {
@@ -202,7 +203,5 @@
     ///Return a highest level active item.
 
-    ///Return a highest level active item.
-    ///
-    ///\return the highest level active item or INVALID if there is no active
+    ///Return a highest level active item or INVALID if there is no active
     ///item.
     Item highestActive() const
@@ -211,9 +210,7 @@
     }
 
-    ///Return a highest active level.
-
-    ///Return a highest active level.
-    ///
-    ///\return the level of the highest active item or -1 if there is no active
+    ///Return the highest active level.
+
+    ///Return the level of the highest active item or -1 if there is no active
     ///item.
     int highestActiveLevel() const
@@ -234,5 +231,5 @@
     }
 
-    ///Lift the highest active item.
+    ///Lift the highest active item to the given level.
 
     ///Lift the item returned by highestActive() to level \c new_level.
@@ -256,12 +253,8 @@
     }
 
-    ///Lift the highest active item.
+    ///Lift the highest active item to the top level.
 
     ///Lift the item returned by highestActive() to the top level and
-    ///deactivates it.
-    ///
-    ///\warning \c new_level must be strictly higher
-    ///than the current level.
-    ///
+    ///deactivate it.
     void liftHighestActiveToTop()
     {
@@ -290,9 +283,7 @@
     ///@{
 
-    ///Returns an active item on level \c l.
-
-    ///Returns an active item on level \c l.
-    ///
-    ///Returns an active item on level \c l or \ref INVALID if there is no such
+    ///Return an active item on level \c l.
+
+    ///Return an active item on level \c l or \ref INVALID if there is no such
     ///an item. (\c l must be from the range [0...\c max_level].
     Item activeOn(int l) const
@@ -301,7 +292,7 @@
     }
 
-    ///Lifts the active item returned by \c activeOn() member function.
-
-    ///Lifts the active item returned by \c activeOn() member function
+    ///Lift the active item returned by \c activeOn(level) by one.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(level)"
     ///by one.
     Item liftActiveOn(int level)
@@ -313,7 +304,7 @@
     }
 
-    ///Lifts the active item returned by \c activeOn() member function.
-
-    ///Lifts the active item returned by \c activeOn() member function
+    ///Lift the active item returned by \c activeOn(level) to the given level.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(level)"
     ///to the given level.
     void liftActiveOn(int level, int new_level)
@@ -332,8 +323,8 @@
     }
 
-    ///Lifts the active item returned by \c activeOn() member function.
-
-    ///Lifts the active item returned by \c activeOn() member function
-    ///to the top level.
+    ///Lift the active item returned by \c activeOn(level) to the top level.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(level)"
+    ///to the top level and deactivate it.
     void liftActiveToTop(int level)
     {
@@ -385,7 +376,8 @@
     ///Move an inactive item to the top but one level (in a dirty way).
 
-    ///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.
+    ///This function moves an inactive item from the top level to the top
+    ///but one level (in a dirty way).
+    ///\warning It makes the underlying datastructure corrupt, so use it
+    ///only if you really know what it is for.
     ///\pre The item is on the top level.
     void dirtyTopButOne(Item i) {
@@ -393,8 +385,8 @@
     }
 
-    ///Lift all items on and above a level to the top (and deactivate them).
-
-    ///This function lifts all items on and above level \c l to \c
-    ///maxLevel(), and also deactivates them.
+    ///Lift all items on and above the given level to the top level.
+
+    ///This function lifts all items on and above level \c l to the top
+    ///level and deactivates them.
     void liftToTop(int l)
     {
@@ -421,16 +413,14 @@
 
     ///\name Initialization
-    ///Using this function you can initialize the levels of the item.
+    ///Using these functions you can initialize the levels of the items.
     ///\n
-    ///This initializatios is started with calling \c initStart().
-    ///Then the
-    ///items should be listed levels by levels statring with the lowest one
-    ///(with level 0). This is done by using \c initAddItem()
-    ///and \c initNewLevel(). Finally \c initFinish() must be called.
-    ///The items not listed will be put on the highest level.
+    ///The initialization must be started with calling \c initStart().
+    ///Then the items should be listed level by level starting with the
+    ///lowest one (level 0) using \c initAddItem() and \c initNewLevel().
+    ///Finally \c initFinish() must be called.
+    ///The items not listed are put on the highest level.
     ///@{
 
     ///Start the initialization process.
-
     void initStart()
     {
@@ -450,5 +440,4 @@
 
     ///Add an item to the current level.
-
     void initAddItem(Item i)
     {
@@ -470,5 +459,4 @@
 
     ///Finalize the initialization process.
-
     void initFinish()
     {
@@ -501,7 +489,7 @@
   ///\sa Elevator
   ///
-  ///\param Graph the underlying graph type
+  ///\param Graph Type of the underlying graph.
   ///\param Item Type of the items the data is assigned to (Graph::Node,
-  ///Graph::Edge, Graph::UEdge)
+  ///Graph::Arc, Graph::Edge).
   template <class Graph, class Item>
   class LinkedElevator {
@@ -534,7 +522,7 @@
     ///Constructor with given maximum level.
     ///
-    ///\param g The underlying graph
-    ///\param max_level Set the range of the possible labels to
-    ///[0...\c max_level]
+    ///\param graph The underlying graph.
+    ///\param max_level The maximum allowed level.
+    ///Set the range of the possible labels to <tt>[0..max_level]</tt>.
     LinkedElevator(const Graph& graph, int max_level)
       : _graph(graph), _max_level(max_level), _item_num(_max_level),
@@ -547,6 +535,6 @@
     ///Constructor.
     ///
-    ///\param g The underlying graph
-    ///The range of the possible labels is [0...\c max_level],
+    ///\param graph The underlying graph.
+    ///Set the range of the possible labels to <tt>[0..max_level]</tt>,
     ///where \c max_level is equal to the number of labeled items in the graph.
     LinkedElevator(const Graph& graph)
@@ -658,5 +646,5 @@
     }
 
-    ///Return true if there is not active item on level \c l.
+    ///Return true if there is no active item on level \c l.
     bool activeFree(int l) const {
       return _first[l] == INVALID || !_active[_first[l]];
@@ -676,18 +664,14 @@
     ///Return a highest level active item.
 
-    ///Return a highest level active item.
-    ///
-    ///\return the highest level active item or INVALID if there is no
-    ///active item.
+    ///Return a highest level active item or INVALID if there is no active
+    ///item.
     Item highestActive() const {
       return _highest_active >= 0 ? _first[_highest_active] : INVALID;
     }
 
-    ///Return a highest active level.
-
-    ///Return a highest active level.
-    ///
-    ///\return the level of the highest active item or -1 if there is
-    ///no active item.
+    ///Return the highest active level.
+
+    ///Return the level of the highest active item or -1 if there is no active
+    ///item.
     int highestActiveLevel() const {
       return _highest_active;
@@ -720,5 +704,5 @@
     }
 
-    ///Lift the highest active item.
+    ///Lift the highest active item to the given level.
 
     ///Lift the item returned by highestActive() to level \c new_level.
@@ -748,9 +732,8 @@
     }
 
-    ///Lift the highest active to top.
+    ///Lift the highest active item to the top level.
 
     ///Lift the item returned by highestActive() to the top level and
-    ///deactivates the item.
-    ///
+    ///deactivate it.
     void liftHighestActiveToTop() {
       Item i = _first[_highest_active];
@@ -774,9 +757,7 @@
     ///@{
 
-    ///Returns an active item on level \c l.
-
-    ///Returns an active item on level \c l.
-    ///
-    ///Returns an active item on level \c l or \ref INVALID if there is no such
+    ///Return an active item on level \c l.
+
+    ///Return an active item on level \c l or \ref INVALID if there is no such
     ///an item. (\c l must be from the range [0...\c max_level].
     Item activeOn(int l) const
@@ -785,7 +766,7 @@
     }
 
-    ///Lifts the active item returned by \c activeOn() member function.
-
-    ///Lifts the active item returned by \c activeOn() member function
+    ///Lift the active item returned by \c activeOn(l) by one.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(l)"
     ///by one.
     Item liftActiveOn(int l)
@@ -814,8 +795,8 @@
     }
 
-    /// \brief Lifts the active item returned by \c activeOn() member function.
-    ///
-    /// Lifts the active item returned by \c activeOn() member function
-    /// to the given level.
+    ///Lift the active item returned by \c activeOn(l) to the given level.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(l)"
+    ///to the given level.
     void liftActiveOn(int l, int new_level)
     {
@@ -843,8 +824,8 @@
     }
 
-    ///Lifts the active item returned by \c activeOn() member function.
-
-    ///Lifts the active item returned by \c activeOn() member function
-    ///to the top level.
+    ///Lift the active item returned by \c activeOn(l) to the top level.
+
+    ///Lift the active item returned by \ref activeOn() "activeOn(l)"
+    ///to the top level and deactivate it.
     void liftActiveToTop(int l)
     {
@@ -901,7 +882,8 @@
     ///Move an inactive item to the top but one level (in a dirty way).
 
-    ///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.
+    ///This function moves an inactive item from the top level to the top
+    ///but one level (in a dirty way).
+    ///\warning It makes the underlying datastructure corrupt, so use it
+    ///only if you really know what it is for.
     ///\pre The item is on the top level.
     void dirtyTopButOne(Item i) {
@@ -909,8 +891,8 @@
     }
 
-    ///Lift all items on and above a level to the top (and deactivate them).
-
-    ///This function lifts all items on and above level \c l to \c
-    ///maxLevel(), and also deactivates them.
+    ///Lift all items on and above the given level to the top level.
+
+    ///This function lifts all items on and above level \c l to the top
+    ///level and deactivates them.
     void liftToTop(int l)  {
       for (int i = l + 1; _first[i] != INVALID; ++i) {
@@ -937,16 +919,14 @@
 
     ///\name Initialization
-    ///Using this function you can initialize the levels of the item.
+    ///Using these functions you can initialize the levels of the items.
     ///\n
-    ///This initializatios is started with calling \c initStart().
-    ///Then the
-    ///items should be listed levels by levels statring with the lowest one
-    ///(with level 0). This is done by using \c initAddItem()
-    ///and \c initNewLevel(). Finally \c initFinish() must be called.
-    ///The items not listed will be put on the highest level.
+    ///The initialization must be started with calling \c initStart().
+    ///Then the items should be listed level by level starting with the
+    ///lowest one (level 0) using \c initAddItem() and \c initNewLevel().
+    ///Finally \c initFinish() must be called.
+    ///The items not listed are put on the highest level.
     ///@{
 
     ///Start the initialization process.
-
     void initStart() {
 
@@ -963,5 +943,4 @@
 
     ///Add an item to the current level.
-
     void initAddItem(Item i) {
       _level.set(i, _init_level);
@@ -988,5 +967,4 @@
 
     ///Finalize the initialization process.
-
     void initFinish() {
       _highest_active = -1;
