Index: doc/coding_style.dox
===================================================================
--- doc/coding_style.dox	(revision 1023)
+++ doc/coding_style.dox	(revision 463)
@@ -99,8 +99,8 @@
 \subsection pri-loc-var Private member variables
 
-Private member variables should start with underscore.
+Private member variables should start with underscore
 
 \code
-_start_with_underscore
+_start_with_underscores
 \endcode
 
Index: doc/groups.dox
===================================================================
--- doc/groups.dox	(revision 1023)
+++ doc/groups.dox	(revision 999)
@@ -407,8 +407,8 @@
    strongly polynomial \ref klein67primal, \ref goldberg89cyclecanceling.
 
-In general, \ref NetworkSimplex and \ref CostScaling are the most efficient
-implementations, but the other two algorithms could be faster in special cases.
+In general NetworkSimplex is the most efficient implementation,
+but in special cases other algorithms could be faster.
 For example, if the total supply and/or capacities are rather small,
-\ref CapacityScaling is usually the fastest algorithm (without effective scaling).
+CapacityScaling is usually the fastest algorithm (without effective scaling).
 */
 
@@ -472,5 +472,5 @@
   \ref dasdan98minmeancycle.
 
-In practice, the \ref HowardMmc "Howard" algorithm turned out to be by far the
+In practice, the \ref HowardMmc "Howard" algorithm proved to be by far the
 most efficient one, though the best known theoretical bound on its running
 time is exponential.
@@ -540,5 +540,5 @@
 
 /**
-@defgroup planar Planar Embedding and Drawing
+@defgroup planar Planarity Embedding and Drawing
 @ingroup algs
 \brief Algorithms for planarity checking, embedding and drawing
Index: lemon/capacity_scaling.h
===================================================================
--- lemon/capacity_scaling.h	(revision 1023)
+++ lemon/capacity_scaling.h	(revision 1025)
@@ -87,8 +87,9 @@
   /// consider to use the named template parameters instead.
   ///
-  /// \warning Both number types must be signed and all input data must
+  /// \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 This algorithm does not support negative costs for
-  /// arcs having infinite upper bound.
+  /// \warning This algorithm does not support negative costs for such
+  /// arcs that have infinite upper bound.
 #ifdef DOXYGEN
   template <typename GR, typename V, typename C, typename TR>
@@ -423,5 +424,5 @@
     ///
     /// Using this function has the same effect as using \ref supplyMap()
-    /// with a map in which \c k is assigned to \c s, \c -k is
+    /// with such a map in which \c k is assigned to \c s, \c -k is
     /// assigned to \c t and all other nodes have zero supply value.
     ///
Index: lemon/core.h
===================================================================
--- lemon/core.h	(revision 1023)
+++ lemon/core.h	(revision 988)
@@ -448,5 +448,5 @@
   }
 
-  /// \brief Check whether a graph is undirected.
+  /// Check whether a graph is undirected.
   ///
   /// This function returns \c true if the given graph is undirected.
Index: lemon/cost_scaling.h
===================================================================
--- lemon/cost_scaling.h	(revision 1023)
+++ lemon/cost_scaling.h	(revision 1025)
@@ -98,7 +98,4 @@
   /// "preflow push-relabel" algorithm for the maximum flow problem.
   ///
-  /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest
-  /// implementations available in LEMON for this problem.
-  ///
   /// Most of the parameters of the problem (except for the digraph)
   /// can be given using separate functions, and the algorithm can be
@@ -117,8 +114,9 @@
   /// consider to use the named template parameters instead.
   ///
-  /// \warning Both number types must be signed and all input data must
+  /// \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 This algorithm does not support negative costs for
-  /// arcs having infinite upper bound.
+  /// \warning This algorithm does not support negative costs for such
+  /// arcs that have infinite upper bound.
   ///
   /// \note %CostScaling provides three different internal methods,
@@ -182,5 +180,5 @@
     /// relabel operation.
     /// By default, the so called \ref PARTIAL_AUGMENT
-    /// "Partial Augment-Relabel" method is used, which turned out to be
+    /// "Partial Augment-Relabel" method is used, which proved to be
     /// the most efficient and the most robust on various test inputs.
     /// However, the other methods can be selected using the \ref run()
@@ -451,5 +449,5 @@
     ///
     /// Using this function has the same effect as using \ref supplyMap()
-    /// with a map in which \c k is assigned to \c s, \c -k is
+    /// with such a map in which \c k is assigned to \c s, \c -k is
     /// assigned to \c t and all other nodes have zero supply value.
     ///
Index: lemon/cycle_canceling.h
===================================================================
--- lemon/cycle_canceling.h	(revision 1023)
+++ lemon/cycle_canceling.h	(revision 1025)
@@ -66,8 +66,9 @@
   /// algorithm. By default, it is the same as \c V.
   ///
-  /// \warning Both number types must be signed and all input data must
+  /// \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 This algorithm does not support negative costs for
-  /// arcs having infinite upper bound.
+  /// \warning This algorithm does not support negative costs for such
+  /// arcs that have infinite upper bound.
   ///
   /// \note For more information about the three available methods,
@@ -117,5 +118,6 @@
     /// \ref CycleCanceling provides three different cycle-canceling
     /// methods. By default, \ref CANCEL_AND_TIGHTEN "Cancel and Tighten"
-    /// is used, which is by far the most efficient and the most robust.
+    /// is used, which proved to be the most efficient and the most robust
+    /// on various test inputs.
     /// However, the other methods can be selected using the \ref run()
     /// function with the proper parameter.
@@ -349,5 +351,5 @@
     ///
     /// Using this function has the same effect as using \ref supplyMap()
-    /// with a map in which \c k is assigned to \c s, \c -k is
+    /// with such a map in which \c k is assigned to \c s, \c -k is
     /// assigned to \c t and all other nodes have zero supply value.
     ///
Index: lemon/euler.h
===================================================================
--- lemon/euler.h	(revision 1023)
+++ lemon/euler.h	(revision 956)
@@ -37,5 +37,5 @@
   ///Euler tour iterator for digraphs.
 
-  /// \ingroup graph_properties
+  /// \ingroup graph_prop
   ///This iterator provides an Euler tour (Eulerian circuit) of a \e directed
   ///graph (if there exists) and it converts to the \c Arc type of the digraph.
Index: lemon/grosso_locatelli_pullan_mc.h
===================================================================
--- lemon/grosso_locatelli_pullan_mc.h	(revision 1022)
+++ lemon/grosso_locatelli_pullan_mc.h	(revision 999)
@@ -47,10 +47,6 @@
   ///
   /// This class provides a simple but highly efficient and robust heuristic
-  /// method that quickly finds a quite large clique, but not necessarily the
+  /// method that quickly finds a large clique, but not necessarily the
   /// largest one.
-  /// The algorithm performs a certain number of iterations to find several
-  /// cliques and selects the largest one among them. Various limits can be
-  /// specified to control the running time and the effectiveness of the
-  /// search process.
   ///
   /// \tparam GR The undirected graph type the algorithm runs on.
@@ -89,20 +85,4 @@
     };
 
-    /// \brief Constants for the causes of search termination.
-    ///
-    /// Enum type containing constants for the different causes of search
-    /// termination. The \ref run() function returns one of these values.
-    enum TerminationCause {
-
-      /// The iteration count limit is reached.
-      ITERATION_LIMIT,
-
-      /// The step count limit is reached.
-      STEP_LIMIT,
-
-      /// The clique size limit is reached.
-      SIZE_LIMIT
-    };
-
   private:
 
@@ -114,5 +94,4 @@
     // Note: vector<char> is used instead of vector<bool> for efficiency reasons
 
-    // The underlying graph
     const GR &_graph;
     IntNodeMap _id;
@@ -121,13 +100,4 @@
     BoolMatrix _gr;
     int _n;
-    
-    // Search options
-    bool _delta_based_restart;
-    int _restart_delta_limit;
- 
-    // Search limits
-    int _iteration_limit;
-    int _step_limit;
-    int _size_limit;
 
     // The current clique
@@ -411,7 +381,5 @@
     GrossoLocatelliPullanMc(const GR& graph) :
       _graph(graph), _id(_graph), _rnd(rnd)
-    {
-      initOptions();
-    }
+    {}
 
     /// \brief Constructor with random seed.
@@ -424,7 +392,5 @@
     GrossoLocatelliPullanMc(const GR& graph, int seed) :
       _graph(graph), _id(_graph), _rnd(seed)
-    {
-      initOptions();
-    }
+    {}
 
     /// \brief Constructor with random number generator.
@@ -437,145 +403,36 @@
     GrossoLocatelliPullanMc(const GR& graph, const Random& random) :
       _graph(graph), _id(_graph), _rnd(random)
-    {
-      initOptions();
-    }
+    {}
 
     /// \name Execution Control
-    /// The \ref run() function can be used to execute the algorithm.\n
-    /// The functions \ref iterationLimit(int), \ref stepLimit(int), and 
-    /// \ref sizeLimit(int) can be used to specify various limits for the
-    /// search process.
-    
     /// @{
-    
-    /// \brief Sets the maximum number of iterations.
-    ///
-    /// This function sets the maximum number of iterations.
-    /// Each iteration of the algorithm finds a maximal clique (but not
-    /// necessarily the largest one) by performing several search steps
-    /// (node selections).
-    ///
-    /// This limit controls the running time and the success of the
-    /// algorithm. For larger values, the algorithm runs slower, but it more
+
+    /// \brief Runs the algorithm.
+    ///
+    /// This function runs the algorithm.
+    ///
+    /// \param step_num The maximum number of node selections (steps)
+    /// during the search process.
+    /// This parameter controls the running time and the success of the
+    /// algorithm. For larger values, the algorithm runs slower but it more
     /// likely finds larger cliques. For smaller values, the algorithm is
     /// faster but probably gives worse results.
-    /// 
-    /// The default value is \c 1000.
-    /// \c -1 means that number of iterations is not limited.
-    ///
-    /// \warning You should specify a reasonable limit for the number of
-    /// iterations and/or the number of search steps.
-    ///
-    /// \return <tt>(*this)</tt>
-    ///
-    /// \sa stepLimit(int)
-    /// \sa sizeLimit(int)
-    GrossoLocatelliPullanMc& iterationLimit(int limit) {
-      _iteration_limit = limit;
-      return *this;
-    }
-    
-    /// \brief Sets the maximum number of search steps.
-    ///
-    /// This function sets the maximum number of elementary search steps.
-    /// Each iteration of the algorithm finds a maximal clique (but not
-    /// necessarily the largest one) by performing several search steps
-    /// (node selections).
-    ///
-    /// This limit controls the running time and the success of the
-    /// algorithm. For larger values, the algorithm runs slower, but it more
-    /// likely finds larger cliques. For smaller values, the algorithm is
-    /// faster but probably gives worse results.
-    /// 
-    /// The default value is \c -1, which means that number of steps
-    /// is not limited explicitly. However, the number of iterations is
-    /// limited and each iteration performs a finite number of search steps.
-    ///
-    /// \warning You should specify a reasonable limit for the number of
-    /// iterations and/or the number of search steps.
-    ///
-    /// \return <tt>(*this)</tt>
-    ///
-    /// \sa iterationLimit(int)
-    /// \sa sizeLimit(int)
-    GrossoLocatelliPullanMc& stepLimit(int limit) {
-      _step_limit = limit;
-      return *this;
-    }
-    
-    /// \brief Sets the desired clique size.
-    ///
-    /// This function sets the desired clique size that serves as a search
-    /// limit. If a clique of this size (or a larger one) is found, then the
-    /// algorithm terminates.
-    /// 
-    /// This function is especially useful if you know an exact upper bound
-    /// for the size of the cliques in the graph or if any clique above 
-    /// a certain size limit is sufficient for your application.
-    /// 
-    /// The default value is \c -1, which means that the size limit is set to
-    /// the number of nodes in the graph.
-    ///
-    /// \return <tt>(*this)</tt>
-    ///
-    /// \sa iterationLimit(int)
-    /// \sa stepLimit(int)
-    GrossoLocatelliPullanMc& sizeLimit(int limit) {
-      _size_limit = limit;
-      return *this;
-    }
-    
-    /// \brief The maximum number of iterations.
-    ///
-    /// This function gives back the maximum number of iterations.
-    /// \c -1 means that no limit is specified.
-    ///
-    /// \sa iterationLimit(int)
-    int iterationLimit() const {
-      return _iteration_limit;
-    }
-    
-    /// \brief The maximum number of search steps.
-    ///
-    /// This function gives back the maximum number of search steps.
-    /// \c -1 means that no limit is specified.
-    ///
-    /// \sa stepLimit(int)
-    int stepLimit() const {
-      return _step_limit;
-    }
-    
-    /// \brief The desired clique size.
-    ///
-    /// This function gives back the desired clique size that serves as a
-    /// search limit. \c -1 means that this limit is set to the number of
-    /// nodes in the graph.
-    ///
-    /// \sa sizeLimit(int)
-    int sizeLimit() const {
-      return _size_limit;
-    }
-
-    /// \brief Runs the algorithm.
-    ///
-    /// This function runs the algorithm. If one of the specified limits
-    /// is reached, the search process terminates.
-    ///
     /// \param rule The node selection rule. For more information, see
     /// \ref SelectionRule.
     ///
-    /// \return The termination cause of the search. For more information,
-    /// see \ref TerminationCause.
-    TerminationCause run(SelectionRule rule = PENALTY_BASED)
+    /// \return The size of the found clique.
+    int run(int step_num = 100000,
+            SelectionRule rule = PENALTY_BASED)
     {
       init();
       switch (rule) {
         case RANDOM:
-          return start<RandomSelectionRule>();
+          return start<RandomSelectionRule>(step_num);
         case DEGREE_BASED:
-          return start<DegreeBasedSelectionRule>();
-        default:
-          return start<PenaltyBasedSelectionRule>();
-      }
+          return start<DegreeBasedSelectionRule>(step_num);
+        case PENALTY_BASED:
+          return start<PenaltyBasedSelectionRule>(step_num);
+      }
+      return 0; // avoid warning
     }
 
@@ -583,7 +440,4 @@
 
     /// \name Query Functions
-    /// The results of the algorithm can be obtained using these functions.\n
-    /// The run() function must be called before using them. 
-
     /// @{
 
@@ -677,16 +531,4 @@
 
   private:
-  
-    // Initialize search options and limits
-    void initOptions() {
-      // Search options
-      _delta_based_restart = true;
-      _restart_delta_limit = 4;
-     
-      // Search limits
-      _iteration_limit = 1000;
-      _step_limit = -1;             // this is disabled by default
-      _size_limit = -1;             // this is disabled by default
-    }
 
     // Adds a node to the current clique
@@ -745,30 +587,28 @@
     // Executes the algorithm
     template <typename SelectionRuleImpl>
-    TerminationCause start() {
-      if (_n == 0) return SIZE_LIMIT;
+    int start(int max_select) {
+      // Options for the restart rule
+      const bool delta_based_restart = true;
+      const int restart_delta_limit = 4;
+
+      if (_n == 0) return 0;
       if (_n == 1) {
         _best_clique[0] = true;
         _best_size = 1;
-        return SIZE_LIMIT;
-      }
-
-      // Iterated local search algorithm
-      const int max_size = _size_limit >= 0 ? _size_limit : _n;
-      const int max_restart = _iteration_limit >= 0 ?
-        _iteration_limit : std::numeric_limits<int>::max();
-      const int max_select = _step_limit >= 0 ?
-        _step_limit : std::numeric_limits<int>::max();
-
+        return _best_size;
+      }
+
+      // Iterated local search
       SelectionRuleImpl sel_method(*this);
-      int select = 0, restart = 0;
+      int select = 0;
       IntVector restart_nodes;
-      while (select < max_select && restart < max_restart) {
+
+      while (select < max_select) {
 
         // Perturbation/restart
-        restart++;
-        if (_delta_based_restart) {
+        if (delta_based_restart) {
           restart_nodes.clear();
           for (int i = 0; i != _n; i++) {
-            if (_delta[i] >= _restart_delta_limit)
+            if (_delta[i] >= restart_delta_limit)
               restart_nodes.push_back(i);
           }
@@ -824,10 +664,10 @@
           _best_clique = _clique;
           _best_size = _size;
-          if (_best_size >= max_size) return SIZE_LIMIT;
+          if (_best_size == _n) return _best_size;
         }
         sel_method.update();
       }
 
-      return (restart >= max_restart ? ITERATION_LIMIT : STEP_LIMIT);
+      return _best_size;
     }
 
Index: lemon/kruskal.h
===================================================================
--- lemon/kruskal.h	(revision 631)
+++ lemon/kruskal.h	(revision 1025)
@@ -31,7 +31,4 @@
 ///\file
 ///\brief Kruskal's algorithm to compute a minimum cost spanning tree
-///
-///Kruskal's algorithm to compute a minimum cost spanning tree.
-///
 
 namespace lemon {
Index: lemon/network_simplex.h
===================================================================
--- lemon/network_simplex.h	(revision 1023)
+++ lemon/network_simplex.h	(revision 1025)
@@ -48,8 +48,8 @@
   /// flow problem.
   ///
-  /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest
-  /// implementations available in LEMON for this problem.
-  /// Furthermore, this class supports both directions of the supply/demand
-  /// inequality constraints. For more information, see \ref SupplyType.
+  /// In general, %NetworkSimplex is the fastest implementation available
+  /// in LEMON for this problem.
+  /// Moreover, it supports both directions of the supply/demand inequality
+  /// constraints. For more information, see \ref SupplyType.
   ///
   /// Most of the parameters of the problem (except for the digraph)
@@ -64,5 +64,6 @@
   /// algorithm. By default, it is the same as \c V.
   ///
-  /// \warning Both number types must be signed and all input data must
+  /// \warning Both \c V and \c C must be signed number types.
+  /// \warning All input data (capacities, supply values, and costs) must
   /// be integer.
   ///
@@ -126,5 +127,5 @@
     /// of the algorithm.
     /// By default, \ref BLOCK_SEARCH "Block Search" is used, which
-    /// turend out to be the most efficient and the most robust on various
+    /// proved to be the most efficient and the most robust on various
     /// test inputs.
     /// However, another pivot rule can be selected using the \ref run()
@@ -168,5 +169,5 @@
     typedef std::vector<Cost> CostVector;
     typedef std::vector<signed char> CharVector;
-    // Note: vector<signed char> is used instead of vector<ArcState> and
+    // Note: vector<signed char> is used instead of vector<ArcState> and 
     // vector<ArcDirection> for efficiency reasons
 
@@ -735,6 +736,4 @@
     ///
     /// \return <tt>(*this)</tt>
-    ///
-    /// \sa supplyType()
     template<typename SupplyMap>
     NetworkSimplex& supplyMap(const SupplyMap& map) {
@@ -753,5 +752,5 @@
     ///
     /// Using this function has the same effect as using \ref supplyMap()
-    /// with a map in which \c k is assigned to \c s, \c -k is
+    /// with such a map in which \c k is assigned to \c s, \c -k is
     /// assigned to \c t and all other nodes have zero supply value.
     ///
Index: lemon/path.h
===================================================================
--- lemon/path.h	(revision 1024)
+++ lemon/path.h	(revision 956)
@@ -44,5 +44,5 @@
   ///
   /// In a sense, the path can be treated as a list of arcs. The
-  /// LEMON path type stores just this list. As a consequence, it
+  /// lemon path type stores just this list. As a consequence, it
   /// cannot enumerate the nodes of the path and the source node of
   /// a zero length path is undefined.
@@ -136,5 +136,5 @@
     void clear() { head.clear(); tail.clear(); }
 
-    /// \brief The n-th arc.
+    /// \brief The nth arc.
     ///
     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
@@ -144,5 +144,5 @@
     }
 
-    /// \brief Initialize arc iterator to point to the n-th arc
+    /// \brief Initialize arc iterator to point to the nth arc
     ///
     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
@@ -232,5 +232,5 @@
   ///
   /// In a sense, the path can be treated as a list of arcs. The
-  /// LEMON path type stores just this list. As a consequence it
+  /// lemon path type stores just this list. As a consequence it
   /// cannot enumerate the nodes in the path and the zero length paths
   /// cannot store the source.
@@ -328,5 +328,5 @@
     void clear() { data.clear(); }
 
-    /// \brief The n-th arc.
+    /// \brief The nth arc.
     ///
     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
@@ -335,5 +335,5 @@
     }
 
-    /// \brief  Initializes arc iterator to point to the n-th arc.
+    /// \brief  Initializes arc iterator to point to the nth arc.
     ArcIt nthIt(int n) const {
       return ArcIt(*this, n);
@@ -396,5 +396,5 @@
   ///
   /// In a sense, the path can be treated as a list of arcs. The
-  /// LEMON path type stores just this list. As a consequence it
+  /// lemon path type stores just this list. As a consequence it
   /// cannot enumerate the nodes in the path and the zero length paths
   /// cannot store the source.
@@ -505,7 +505,7 @@
     };
 
-    /// \brief The n-th arc.
-    ///
-    /// This function looks for the n-th arc in O(n) time.
+    /// \brief The nth arc.
+    ///
+    /// This function looks for the nth arc in O(n) time.
     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
     const Arc& nth(int n) const {
@@ -517,5 +517,5 @@
     }
 
-    /// \brief Initializes arc iterator to point to the n-th arc.
+    /// \brief Initializes arc iterator to point to the nth arc.
     ArcIt nthIt(int n) const {
       Node *node = first;
@@ -736,5 +736,5 @@
   ///
   /// In a sense, the path can be treated as a list of arcs. The
-  /// LEMON path type stores just this list. As a consequence it
+  /// lemon path type stores just this list. As a consequence it
   /// cannot enumerate the nodes in the path and the source node of
   /// a zero length path is undefined.
@@ -832,5 +832,5 @@
     };
 
-    /// \brief The n-th arc.
+    /// \brief The nth arc.
     ///
     /// \pre \c n is in the <tt>[0..length() - 1]</tt> range.
@@ -839,5 +839,5 @@
     }
 
-    /// \brief The arc iterator pointing to the n-th arc.
+    /// \brief The arc iterator pointing to the nth arc.
     ArcIt nthIt(int n) const {
       return ArcIt(*this, n);
@@ -1043,5 +1043,5 @@
   ///
   /// In a sense, the path can be treated as a list of arcs. The
-  /// LEMON path type stores only this list. As a consequence, it
+  /// lemon path type stores only this list. As a consequence, it
   /// cannot enumerate the nodes in the path and the zero length paths
   /// cannot have a source node.
Index: test/max_clique_test.cc
===================================================================
--- test/max_clique_test.cc	(revision 1022)
+++ test/max_clique_test.cc	(revision 999)
@@ -59,5 +59,5 @@
 // Check with general graphs
 template <typename Param>
-void checkMaxCliqueGeneral(Param rule) {
+void checkMaxCliqueGeneral(int max_sel, Param rule) {
   typedef ListGraph GR;
   typedef GrossoLocatelliPullanMc<GR> McAlg;
@@ -69,11 +69,10 @@
     GR::NodeMap<bool> map(g);
     McAlg mc(g);
-    mc.iterationLimit(50);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 0, "Wrong clique size");
     check(mc.cliqueSize() == 0, "Wrong clique size");
     check(CliqueIt(mc) == INVALID, "Wrong CliqueNodeIt");
 
     GR::Node u = g.addNode();
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 1, "Wrong clique size");
     check(mc.cliqueSize() == 1, "Wrong clique size");
     mc.cliqueMap(map);
@@ -84,5 +83,5 @@
     
     GR::Node v = g.addNode();
-    check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 1, "Wrong clique size");
     check(mc.cliqueSize() == 1, "Wrong clique size");
     mc.cliqueMap(map);
@@ -92,5 +91,5 @@
 
     g.addEdge(u, v);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 2, "Wrong clique size");
     check(mc.cliqueSize() == 2, "Wrong clique size");
     mc.cliqueMap(map);
@@ -112,6 +111,5 @@
     
     McAlg mc(g);
-    mc.iterationLimit(50);
-    check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == 4, "Wrong clique size");
     check(mc.cliqueSize() == 4, "Wrong clique size");
     mc.cliqueMap(map);
@@ -130,5 +128,5 @@
 // Check with full graphs
 template <typename Param>
-void checkMaxCliqueFullGraph(Param rule) {
+void checkMaxCliqueFullGraph(int max_sel, Param rule) {
   typedef FullGraph GR;
   typedef GrossoLocatelliPullanMc<FullGraph> McAlg;
@@ -139,5 +137,5 @@
     GR::NodeMap<bool> map(g);
     McAlg mc(g);
-    check(mc.run(rule) == McAlg::SIZE_LIMIT, "Wrong termination cause");
+    check(mc.run(max_sel, rule) == size, "Wrong clique size");
     check(mc.cliqueSize() == size, "Wrong clique size");
     mc.cliqueMap(map);
@@ -153,19 +151,9 @@
 // Check with grid graphs
 template <typename Param>
-void checkMaxCliqueGridGraph(Param rule) {
+void checkMaxCliqueGridGraph(int max_sel, Param rule) {
   GridGraph g(5, 7);
   GridGraph::NodeMap<char> map(g);
   GrossoLocatelliPullanMc<GridGraph> mc(g);
-  
-  mc.iterationLimit(100);
-  check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause");
-  check(mc.cliqueSize() == 2, "Wrong clique size");
-
-  mc.stepLimit(100);
-  check(mc.run(rule) == mc.STEP_LIMIT, "Wrong termination cause");
-  check(mc.cliqueSize() == 2, "Wrong clique size");
-
-  mc.sizeLimit(2);
-  check(mc.run(rule) == mc.SIZE_LIMIT, "Wrong termination cause");
+  check(mc.run(max_sel, rule) == 2, "Wrong clique size");
   check(mc.cliqueSize() == 2, "Wrong clique size");
 }
@@ -173,15 +161,15 @@
 
 int main() {
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::RANDOM);
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::DEGREE_BASED);
-  checkMaxCliqueGeneral(GrossoLocatelliPullanMc<ListGraph>::PENALTY_BASED);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::RANDOM);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::DEGREE_BASED);
+  checkMaxCliqueGeneral(50, GrossoLocatelliPullanMc<ListGraph>::PENALTY_BASED);
 
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::RANDOM);
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED);
-  checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::RANDOM);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED);
+  checkMaxCliqueFullGraph(50, GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED);
                        
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::RANDOM);
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED);
-  checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::RANDOM);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED);
+  checkMaxCliqueGridGraph(50, GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED);
                        
   return 0;
