lemon/grosso_locatelli_pullan_mc.h
changeset 1092 dceba191c00d
parent 1053 1c978b5bcc65
     1.1 --- a/lemon/grosso_locatelli_pullan_mc.h	Fri Aug 09 14:07:27 2013 +0200
     1.2 +++ b/lemon/grosso_locatelli_pullan_mc.h	Fri Aug 09 11:28:17 2013 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2010
     1.8 + * Copyright (C) 2003-2013
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -120,11 +120,11 @@
    1.13      // Internal matrix representation of the graph
    1.14      BoolMatrix _gr;
    1.15      int _n;
    1.16 -    
    1.17 +
    1.18      // Search options
    1.19      bool _delta_based_restart;
    1.20      int _restart_delta_limit;
    1.21 - 
    1.22 +
    1.23      // Search limits
    1.24      int _iteration_limit;
    1.25      int _step_limit;
    1.26 @@ -442,12 +442,12 @@
    1.27  
    1.28      /// \name Execution Control
    1.29      /// The \ref run() function can be used to execute the algorithm.\n
    1.30 -    /// The functions \ref iterationLimit(int), \ref stepLimit(int), and 
    1.31 +    /// The functions \ref iterationLimit(int), \ref stepLimit(int), and
    1.32      /// \ref sizeLimit(int) can be used to specify various limits for the
    1.33      /// search process.
    1.34 -    
    1.35 +
    1.36      /// @{
    1.37 -    
    1.38 +
    1.39      /// \brief Sets the maximum number of iterations.
    1.40      ///
    1.41      /// This function sets the maximum number of iterations.
    1.42 @@ -459,7 +459,7 @@
    1.43      /// algorithm. For larger values, the algorithm runs slower, but it more
    1.44      /// likely finds larger cliques. For smaller values, the algorithm is
    1.45      /// faster but probably gives worse results.
    1.46 -    /// 
    1.47 +    ///
    1.48      /// The default value is \c 1000.
    1.49      /// \c -1 means that number of iterations is not limited.
    1.50      ///
    1.51 @@ -474,7 +474,7 @@
    1.52        _iteration_limit = limit;
    1.53        return *this;
    1.54      }
    1.55 -    
    1.56 +
    1.57      /// \brief Sets the maximum number of search steps.
    1.58      ///
    1.59      /// This function sets the maximum number of elementary search steps.
    1.60 @@ -486,7 +486,7 @@
    1.61      /// algorithm. For larger values, the algorithm runs slower, but it more
    1.62      /// likely finds larger cliques. For smaller values, the algorithm is
    1.63      /// faster but probably gives worse results.
    1.64 -    /// 
    1.65 +    ///
    1.66      /// The default value is \c -1, which means that number of steps
    1.67      /// is not limited explicitly. However, the number of iterations is
    1.68      /// limited and each iteration performs a finite number of search steps.
    1.69 @@ -502,17 +502,17 @@
    1.70        _step_limit = limit;
    1.71        return *this;
    1.72      }
    1.73 -    
    1.74 +
    1.75      /// \brief Sets the desired clique size.
    1.76      ///
    1.77      /// This function sets the desired clique size that serves as a search
    1.78      /// limit. If a clique of this size (or a larger one) is found, then the
    1.79      /// algorithm terminates.
    1.80 -    /// 
    1.81 +    ///
    1.82      /// This function is especially useful if you know an exact upper bound
    1.83 -    /// for the size of the cliques in the graph or if any clique above 
    1.84 +    /// for the size of the cliques in the graph or if any clique above
    1.85      /// a certain size limit is sufficient for your application.
    1.86 -    /// 
    1.87 +    ///
    1.88      /// The default value is \c -1, which means that the size limit is set to
    1.89      /// the number of nodes in the graph.
    1.90      ///
    1.91 @@ -524,7 +524,7 @@
    1.92        _size_limit = limit;
    1.93        return *this;
    1.94      }
    1.95 -    
    1.96 +
    1.97      /// \brief The maximum number of iterations.
    1.98      ///
    1.99      /// This function gives back the maximum number of iterations.
   1.100 @@ -534,7 +534,7 @@
   1.101      int iterationLimit() const {
   1.102        return _iteration_limit;
   1.103      }
   1.104 -    
   1.105 +
   1.106      /// \brief The maximum number of search steps.
   1.107      ///
   1.108      /// This function gives back the maximum number of search steps.
   1.109 @@ -544,7 +544,7 @@
   1.110      int stepLimit() const {
   1.111        return _step_limit;
   1.112      }
   1.113 -    
   1.114 +
   1.115      /// \brief The desired clique size.
   1.116      ///
   1.117      /// This function gives back the desired clique size that serves as a
   1.118 @@ -583,7 +583,7 @@
   1.119  
   1.120      /// \name Query Functions
   1.121      /// The results of the algorithm can be obtained using these functions.\n
   1.122 -    /// The run() function must be called before using them. 
   1.123 +    /// The run() function must be called before using them.
   1.124  
   1.125      /// @{
   1.126  
   1.127 @@ -676,13 +676,13 @@
   1.128      /// @}
   1.129  
   1.130    private:
   1.131 -  
   1.132 +
   1.133      // Initialize search options and limits
   1.134      void initOptions() {
   1.135        // Search options
   1.136        _delta_based_restart = true;
   1.137        _restart_delta_limit = 4;
   1.138 -     
   1.139 +
   1.140        // Search limits
   1.141        _iteration_limit = 1000;
   1.142        _step_limit = -1;             // this is disabled by default