Index: lemon/capacity_scaling.h
===================================================================
--- lemon/capacity_scaling.h	(revision 922)
+++ lemon/capacity_scaling.h	(revision 985)
@@ -88,6 +88,6 @@
   ///
   /// \warning Both \c V and \c C must be signed number types.
-  /// \warning All input data (capacities, supply values, and costs) must
-  /// be integer.
+  /// \warning Capacity bounds and supply values must be integer, but
+  /// arc costs can be arbitrary real numbers.
   /// \warning This algorithm does not support negative costs for
   /// arcs having infinite upper bound.
Index: lemon/network_simplex.h
===================================================================
--- lemon/network_simplex.h	(revision 984)
+++ lemon/network_simplex.h	(revision 922)
@@ -123,15 +123,12 @@
     /// the \ref run() function.
     ///
-    /// \ref NetworkSimplex provides five different implementations for
-    /// the pivot strategy that significantly affects the running time
+    /// \ref NetworkSimplex provides five different pivot rule
+    /// implementations that significantly affect the running time
     /// of the algorithm.
-    /// According to experimental tests conducted on various problem
-    /// instances, \ref BLOCK_SEARCH "Block Search" and
-    /// \ref ALTERING_LIST "Altering Candidate List" rules turned out
-    /// to be the most efficient.
-    /// Since \ref BLOCK_SEARCH "Block Search" is a simpler strategy that
-    /// seemed to be slightly more robust, it is used by default.
-    /// However, another pivot rule can easily be selected using the
-    /// \ref run() function with the proper parameter.
+    /// By default, \ref BLOCK_SEARCH "Block Search" is used, which
+    /// turend out to be the most efficient and the most robust on various
+    /// test inputs.
+    /// However, another pivot rule can be selected using the \ref run()
+    /// function with the proper parameter.
     enum PivotRule {
 
@@ -159,5 +156,5 @@
       /// The \e Altering \e Candidate \e List pivot rule.
       /// It is a modified version of the Candidate List method.
-      /// It keeps only a few of the best eligible arcs from the former
+      /// It keeps only the several best eligible arcs from the former
       /// candidate list and extends this list in every iteration.
       ALTERING_LIST
@@ -542,5 +539,5 @@
         SortFunc(const CostVector &map) : _map(map) {}
         bool operator()(int left, int right) {
-          return _map[left] < _map[right];
+          return _map[left] > _map[right];
         }
       };
@@ -560,5 +557,5 @@
         const double BLOCK_SIZE_FACTOR = 1.0;
         const int MIN_BLOCK_SIZE = 10;
-        const double HEAD_LENGTH_FACTOR = 0.01;
+        const double HEAD_LENGTH_FACTOR = 0.1;
         const int MIN_HEAD_LENGTH = 3;
 
@@ -604,7 +601,7 @@
         }
         for (e = 0; e != _next_arc; ++e) {
-          c = _state[e] * (_cost[e] + _pi[_source[e]] - _pi[_target[e]]);
-          if (c < 0) {
-            _cand_cost[e] = c;
+          _cand_cost[e] = _state[e] *
+            (_cost[e] + _pi[_source[e]] - _pi[_target[e]]);
+          if (_cand_cost[e] < 0) {
             _candidates[_curr_length++] = e;
           }
@@ -619,14 +616,14 @@
       search_end:
 
-        // Perform partial sort operation on the candidate list
-        int new_length = std::min(_head_length + 1, _curr_length);
-        std::partial_sort(_candidates.begin(), _candidates.begin() + new_length,
-                          _candidates.begin() + _curr_length, _sort_func);
-
-        // Select the entering arc and remove it from the list
+        // Make heap of the candidate list (approximating a partial sort)
+        make_heap( _candidates.begin(), _candidates.begin() + _curr_length,
+                   _sort_func );
+
+        // Pop the first element of the heap
         _in_arc = _candidates[0];
         _next_arc = e;
-        _candidates[0] = _candidates[new_length - 1];
-        _curr_length = new_length - 1;
+        pop_heap( _candidates.begin(), _candidates.begin() + _curr_length,
+                  _sort_func );
+        _curr_length = std::min(_head_length, _curr_length - 1);
         return true;
       }
