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

.clang-format with proposal for formatting code

File:
1 edited

Legend:

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

    r1573 r2464  
    1313class CbcStatistics {
    1414public:
    15     // Default Constructor
    16     CbcStatistics ();
    17     // Branch
    18     CbcStatistics(CbcNode * node, CbcModel * model);
     15  // Default Constructor
     16  CbcStatistics();
     17  // Branch
     18  CbcStatistics(CbcNode *node, CbcModel *model);
    1919
    20     ~CbcStatistics();
    21     // Copy
    22     CbcStatistics(const CbcStatistics & rhs);
    23     // Assignment
    24     CbcStatistics& operator=(const CbcStatistics & rhs);
    25     // Update at end of branch
    26     void endOfBranch(int numberIterations, double objectiveValue);
    27     // Update number of infeasibilities
    28     void updateInfeasibility(int numberInfeasibilities);
    29     // Branch found to be infeasible by chooseBranch
    30     void sayInfeasible();
    31     // Just prints
    32     void print(const int * sequenceLookup = NULL) const;
    33     // Node number
    34     inline int node() const {
    35         return id_;
    36     }
    37     // Parent node number
    38     inline int parentNode() const {
    39         return parentId_;
    40     }
    41     // depth
    42     inline int depth() const {
    43         return depth_;
    44     }
    45     // way
    46     inline int way() const {
    47         return way_;
    48     }
    49     // value
    50     inline double value() const {
    51         return value_;
    52     }
    53     // starting objective
    54     inline double startingObjective() const {
    55         return startingObjective_;
    56     }
    57     // Unsatisfied at beginning
    58     inline int startingInfeasibility() const {
    59         return startingInfeasibility_;
    60     }
    61     // starting objective
    62     inline double endingObjective() const {
    63         return endingObjective_;
    64     }
    65     // Unsatisfied at end
    66     inline int endingInfeasibility() const {
    67         return endingInfeasibility_;
    68     }
    69     // Number iterations
    70     inline int numberIterations() const {
    71         return numberIterations_;
    72     }
     20  ~CbcStatistics();
     21  // Copy
     22  CbcStatistics(const CbcStatistics &rhs);
     23  // Assignment
     24  CbcStatistics &operator=(const CbcStatistics &rhs);
     25  // Update at end of branch
     26  void endOfBranch(int numberIterations, double objectiveValue);
     27  // Update number of infeasibilities
     28  void updateInfeasibility(int numberInfeasibilities);
     29  // Branch found to be infeasible by chooseBranch
     30  void sayInfeasible();
     31  // Just prints
     32  void print(const int *sequenceLookup = NULL) const;
     33  // Node number
     34  inline int node() const
     35  {
     36    return id_;
     37  }
     38  // Parent node number
     39  inline int parentNode() const
     40  {
     41    return parentId_;
     42  }
     43  // depth
     44  inline int depth() const
     45  {
     46    return depth_;
     47  }
     48  // way
     49  inline int way() const
     50  {
     51    return way_;
     52  }
     53  // value
     54  inline double value() const
     55  {
     56    return value_;
     57  }
     58  // starting objective
     59  inline double startingObjective() const
     60  {
     61    return startingObjective_;
     62  }
     63  // Unsatisfied at beginning
     64  inline int startingInfeasibility() const
     65  {
     66    return startingInfeasibility_;
     67  }
     68  // starting objective
     69  inline double endingObjective() const
     70  {
     71    return endingObjective_;
     72  }
     73  // Unsatisfied at end
     74  inline int endingInfeasibility() const
     75  {
     76    return endingInfeasibility_;
     77  }
     78  // Number iterations
     79  inline int numberIterations() const
     80  {
     81    return numberIterations_;
     82  }
    7383
    7484protected:
    75     // Data
    76     /// Value
    77     double value_;
    78     /// Starting objective
    79     double startingObjective_;
    80     /// Ending objective
    81     double endingObjective_;
    82     /// id
    83     int id_;
    84     /// parent id
    85     int parentId_;
    86     /// way -1 or +1 is first branch -10 or +10 is second branch
    87     int way_;
    88     /// sequence number branched on
    89     int sequence_;
    90     /// depth
    91     int depth_;
    92     /// starting number of integer infeasibilities
    93     int startingInfeasibility_;
    94     /// ending number of integer infeasibilities
    95     int endingInfeasibility_;
    96     /// number of iterations
    97     int numberIterations_;
     85  // Data
     86  /// Value
     87  double value_;
     88  /// Starting objective
     89  double startingObjective_;
     90  /// Ending objective
     91  double endingObjective_;
     92  /// id
     93  int id_;
     94  /// parent id
     95  int parentId_;
     96  /// way -1 or +1 is first branch -10 or +10 is second branch
     97  int way_;
     98  /// sequence number branched on
     99  int sequence_;
     100  /// depth
     101  int depth_;
     102  /// starting number of integer infeasibilities
     103  int startingInfeasibility_;
     104  /// ending number of integer infeasibilities
     105  int endingInfeasibility_;
     106  /// number of iterations
     107  int numberIterations_;
    98108};
    99109
    100110#endif
    101 
Note: See TracChangeset for help on using the changeset viewer.