Ignore:
Timestamp:
Jan 3, 2019 2:03:23 PM (23 months ago)
Author:
unxusr
Message:

.clang-format with proposal for formatting code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristicDINS.hpp

    r1899 r2464  
    1111#include "CbcHeuristic.hpp"
    1212
    13 
    1413class CbcHeuristicDINS : public CbcHeuristic {
    1514public:
     15  // Default Constructor
     16  CbcHeuristicDINS();
    1617
    17     // Default Constructor
    18     CbcHeuristicDINS ();
    19 
    20     /* Constructor with model - assumed before cuts
     18  /* Constructor with model - assumed before cuts
    2119       Initial version does not do Lps
    2220    */
    23     CbcHeuristicDINS (CbcModel & model);
     21  CbcHeuristicDINS(CbcModel &model);
    2422
    25     // Copy constructor
    26     CbcHeuristicDINS ( const CbcHeuristicDINS &);
     23  // Copy constructor
     24  CbcHeuristicDINS(const CbcHeuristicDINS &);
    2725
    28     // Destructor
    29     ~CbcHeuristicDINS ();
     26  // Destructor
     27  ~CbcHeuristicDINS();
    3028
    31     /// Clone
    32     virtual CbcHeuristic * clone() const;
     29  /// Clone
     30  virtual CbcHeuristic *clone() const;
    3331
     32  /// Assignment operator
     33  CbcHeuristicDINS &operator=(const CbcHeuristicDINS &rhs);
    3434
    35     /// Assignment operator
    36     CbcHeuristicDINS & operator=(const CbcHeuristicDINS& rhs);
     35  /// Create C++ lines to get to current state
     36  virtual void generateCpp(FILE *fp);
    3737
    38     /// Create C++ lines to get to current state
    39     virtual void generateCpp( FILE * fp) ;
     38  /// Resets stuff if model changes
     39  virtual void resetModel(CbcModel *model);
    4040
    41     /// Resets stuff if model changes
    42     virtual void resetModel(CbcModel * model);
     41  /// update model (This is needed if cliques update matrix etc)
     42  virtual void setModel(CbcModel *model);
    4343
    44     /// update model (This is needed if cliques update matrix etc)
    45     virtual void setModel(CbcModel * model);
    46 
    47     using CbcHeuristic::solution ;
    48     /** returns 0 if no solution, 1 if valid solution.
     44  using CbcHeuristic::solution;
     45  /** returns 0 if no solution, 1 if valid solution.
    4946        Sets solution values if good, sets objective value (only if good)
    5047        This does Relaxation Induced Neighborhood Search
    5148    */
    52     virtual int solution(double & objectiveValue,
    53                          double * newSolution);
    54     /// This version fixes stuff and does IP
    55     int solutionFix(double & objectiveValue,
    56                     double * newSolution,
    57                     const int * keep);
     49  virtual int solution(double &objectiveValue,
     50    double *newSolution);
     51  /// This version fixes stuff and does IP
     52  int solutionFix(double &objectiveValue,
     53    double *newSolution,
     54    const int *keep);
    5855
    59     /// Sets how often to do it
    60     inline void setHowOften(int value) {
    61         howOften_ = value;
    62     }
    63     /// Sets maximum number of solutions kept
    64     inline void setMaximumKeep(int value) {
    65         maximumKeepSolutions_ = value;
    66     }
    67     /// Sets tightness of extra constraint
    68     inline void setConstraint(int value) {
    69         localSpace_ = value;
    70     }
     56  /// Sets how often to do it
     57  inline void setHowOften(int value)
     58  {
     59    howOften_ = value;
     60  }
     61  /// Sets maximum number of solutions kept
     62  inline void setMaximumKeep(int value)
     63  {
     64    maximumKeepSolutions_ = value;
     65  }
     66  /// Sets tightness of extra constraint
     67  inline void setConstraint(int value)
     68  {
     69    localSpace_ = value;
     70  }
    7171
    7272protected:
    73     // Data
     73  // Data
    7474
    75     /// Number of solutions so we can do something at solution
    76     int numberSolutions_;
    77     /// How often to do (code can change)
    78     int howOften_;
    79     /// Number of successes
    80     int numberSuccesses_;
    81     /// Number of tries
    82     int numberTries_;
    83     /// Maximum number of solutions to keep
    84     int maximumKeepSolutions_;
    85     /// Number of solutions kept
    86     int numberKeptSolutions_;
    87     /// Number of integer variables
    88     int numberIntegers_;
    89     /// Local parameter
    90     int localSpace_;
    91     /// Values of integer variables
    92     int ** values_;
     75  /// Number of solutions so we can do something at solution
     76  int numberSolutions_;
     77  /// How often to do (code can change)
     78  int howOften_;
     79  /// Number of successes
     80  int numberSuccesses_;
     81  /// Number of tries
     82  int numberTries_;
     83  /// Maximum number of solutions to keep
     84  int maximumKeepSolutions_;
     85  /// Number of solutions kept
     86  int numberKeptSolutions_;
     87  /// Number of integer variables
     88  int numberIntegers_;
     89  /// Local parameter
     90  int localSpace_;
     91  /// Values of integer variables
     92  int **values_;
    9393};
    9494
    9595#endif
    96 
Note: See TracChangeset for help on using the changeset viewer.