Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (3 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpPrimalColumnPivot.hpp

    r1732 r2385  
    2323*/
    2424
    25 class ClpPrimalColumnPivot  {
     25class ClpPrimalColumnPivot {
    2626
    2727public:
     28  ///@name Algorithmic methods
     29  //@{
    2830
    29      ///@name Algorithmic methods
    30      //@{
    31 
    32      /** Returns pivot column, -1 if none
     31  /** Returns pivot column, -1 if none
    3332
    3433         Normally updates reduced costs using result of last iteration
     
    4847         We can use other arrays to help updates
    4948     */
    50      virtual int pivotColumn(CoinIndexedVector * updates,
    51                              CoinIndexedVector * spareRow1,
    52                              CoinIndexedVector * spareRow2,
    53                              CoinIndexedVector * spareColumn1,
    54                              CoinIndexedVector * spareColumn2) = 0;
     49  virtual int pivotColumn(CoinIndexedVector *updates,
     50    CoinIndexedVector *spareRow1,
     51    CoinIndexedVector *spareRow2,
     52    CoinIndexedVector *spareColumn1,
     53    CoinIndexedVector *spareColumn2)
     54    = 0;
    5555
    56      /// Updates weights - part 1 (may be empty)
    57      virtual void updateWeights(CoinIndexedVector * input);
     56  /// Updates weights - part 1 (may be empty)
     57  virtual void updateWeights(CoinIndexedVector *input);
    5858
    59      /** Saves any weights round factorization as pivot rows may change
     59  /** Saves any weights round factorization as pivot rows may change
    6060         Will be empty unless steepest edge (will save model)
    6161         May also recompute infeasibility stuff
     
    6868         Also sets model
    6969     */
    70      virtual void saveWeights(ClpSimplex * model, int mode) = 0;
    71      /** Signals pivot row choice:
     70  virtual void saveWeights(ClpSimplex *model, int mode) = 0;
     71  /** Signals pivot row choice:
    7272         -2 (default) - use normal pivot row choice
    7373         -1 to numberRows-1 - use this (will be checked)
    7474         way should be -1 to go to lower bound, +1 to upper bound
    7575     */
    76      virtual int pivotRow(double & way) {
    77           way = 0;
    78           return -2;
    79      }
    80      /// Gets rid of all arrays (may be empty)
    81      virtual void clearArrays();
    82      /// Returns true if would not find any column
    83      virtual bool looksOptimal() const {
    84           return looksOptimal_;
    85      }
    86      /// Sets optimality flag (for advanced use)
    87      virtual void setLooksOptimal(bool flag) {
    88           looksOptimal_ = flag;
    89      }
    90      //@}
     76  virtual int pivotRow(double &way)
     77  {
     78    way = 0;
     79    return -2;
     80  }
     81  /// Gets rid of all arrays (may be empty)
     82  virtual void clearArrays();
     83  /// Returns true if would not find any column
     84  virtual bool looksOptimal() const
     85  {
     86    return looksOptimal_;
     87  }
     88  /// Sets optimality flag (for advanced use)
     89  virtual void setLooksOptimal(bool flag)
     90  {
     91    looksOptimal_ = flag;
     92  }
     93  //@}
    9194
     95  ///@name Constructors and destructors
     96  //@{
     97  /// Default Constructor
     98  ClpPrimalColumnPivot();
    9299
    93      ///@name Constructors and destructors
    94      //@{
    95      /// Default Constructor
    96      ClpPrimalColumnPivot();
     100  /// Copy constructor
     101  ClpPrimalColumnPivot(const ClpPrimalColumnPivot &);
    97102
    98      /// Copy constructor
    99      ClpPrimalColumnPivot(const ClpPrimalColumnPivot &);
     103  /// Assignment operator
     104  ClpPrimalColumnPivot &operator=(const ClpPrimalColumnPivot &rhs);
    100105
    101      /// Assignment operator
    102      ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot& rhs);
     106  /// Destructor
     107  virtual ~ClpPrimalColumnPivot();
    103108
    104      /// Destructor
    105      virtual ~ClpPrimalColumnPivot ();
     109  /// Clone
     110  virtual ClpPrimalColumnPivot *clone(bool copyData = true) const = 0;
    106111
    107      /// Clone
    108      virtual ClpPrimalColumnPivot * clone(bool copyData = true) const = 0;
     112  //@}
    109113
    110      //@}
     114  ///@name Other
     115  //@{
     116  /// Returns model
     117  inline ClpSimplex *model()
     118  {
     119    return model_;
     120  }
     121  /// Sets model
     122  inline void setModel(ClpSimplex *newmodel)
     123  {
     124    model_ = newmodel;
     125  }
    111126
    112      ///@name Other
    113      //@{
    114      /// Returns model
    115      inline ClpSimplex * model() {
    116           return model_;
    117      }
    118      /// Sets model
    119      inline void setModel(ClpSimplex * newmodel) {
    120           model_ = newmodel;
    121      }
     127  /// Returns type (above 63 is extra information)
     128  inline int type()
     129  {
     130    return type_;
     131  }
    122132
    123      /// Returns type (above 63 is extra information)
    124      inline int type() {
    125           return type_;
    126      }
    127 
    128      /** Returns number of extra columns for sprint algorithm - 0 means off.
     133  /** Returns number of extra columns for sprint algorithm - 0 means off.
    129134         Also number of iterations before recompute
    130135     */
    131      virtual int numberSprintColumns(int & numberIterations) const;
    132      /// Switch off sprint idea
    133      virtual void switchOffSprint();
    134      /// Called when maximum pivots changes
    135      virtual void maximumPivotsChanged() {}
     136  virtual int numberSprintColumns(int &numberIterations) const;
     137  /// Switch off sprint idea
     138  virtual void switchOffSprint();
     139  /// Called when maximum pivots changes
     140  virtual void maximumPivotsChanged() {}
    136141
    137      //@}
     142  //@}
    138143
    139      //---------------------------------------------------------------------------
     144  //---------------------------------------------------------------------------
    140145
    141146protected:
    142      ///@name Protected member data
    143      //@{
    144      /// Pointer to model
    145      ClpSimplex * model_;
    146      /// Type of column pivot algorithm
    147      int type_;
    148      /// Says if looks optimal (normally computed)
    149      bool looksOptimal_;
    150      //@}
     147  ///@name Protected member data
     148  //@{
     149  /// Pointer to model
     150  ClpSimplex *model_;
     151  /// Type of column pivot algorithm
     152  int type_;
     153  /// Says if looks optimal (normally computed)
     154  bool looksOptimal_;
     155  //@}
    151156};
    152157#ifndef CLP_PRIMAL_SLACK_MULTIPLIER
     
    154159#endif
    155160#endif
     161
     162/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     163*/
Note: See TracChangeset for help on using the changeset viewer.