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

formatting

File:
1 edited

Legend:

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

    r1910 r2385  
    2424*/
    2525
    26 class AbcPrimalColumnPivot  {
     26class AbcPrimalColumnPivot {
    2727
    2828public:
     29  ///@name Algorithmic methods
     30  //@{
    2931
    30      ///@name Algorithmic methods
    31      //@{
    32 
    33      /** Returns pivot column, -1 if none
     32  /** Returns pivot column, -1 if none
    3433
    3534         Normally updates reduced costs using result of last iteration
     
    4948         We can use other arrays to help updates
    5049     */
    51      virtual int pivotColumn(CoinPartitionedVector * updates,
    52                              CoinPartitionedVector * spareRow2,
    53                              CoinPartitionedVector * spareColumn1) = 0;
     50  virtual int pivotColumn(CoinPartitionedVector *updates,
     51    CoinPartitionedVector *spareRow2,
     52    CoinPartitionedVector *spareColumn1)
     53    = 0;
    5454
    55      /// Updates weights - part 1 (may be empty)
    56      virtual void updateWeights(CoinIndexedVector * input);
     55  /// Updates weights - part 1 (may be empty)
     56  virtual void updateWeights(CoinIndexedVector *input);
    5757
    58      /** Saves any weights round factorization as pivot rows may change
     58  /** Saves any weights round factorization as pivot rows may change
    5959         Will be empty unless steepest edge (will save model)
    6060         May also recompute infeasibility stuff
     
    6767         Also sets model
    6868     */
    69      virtual void saveWeights(AbcSimplex * model, int mode) = 0;
    70      /** Signals pivot row choice:
     69  virtual void saveWeights(AbcSimplex *model, int mode) = 0;
     70  /** Signals pivot row choice:
    7171         -2 (default) - use normal pivot row choice
    7272         -1 to numberRows-1 - use this (will be checked)
    7373         way should be -1 to go to lower bound, +1 to upper bound
    7474     */
    75      virtual int pivotRow(double & way) {
    76           way = 0;
    77           return -2;
    78      }
    79      /// Gets rid of all arrays (may be empty)
    80      virtual void clearArrays();
    81      /// Returns true if would not find any column
    82      virtual bool looksOptimal() const {
    83           return looksOptimal_;
    84      }
    85      /// Sets optimality flag (for advanced use)
    86      virtual void setLooksOptimal(bool flag) {
    87           looksOptimal_ = flag;
    88      }
    89      //@}
     75  virtual int pivotRow(double &way)
     76  {
     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  {
     85    return looksOptimal_;
     86  }
     87  /// Sets optimality flag (for advanced use)
     88  virtual void setLooksOptimal(bool flag)
     89  {
     90    looksOptimal_ = flag;
     91  }
     92  //@}
    9093
     94  ///@name Constructors and destructors
     95  //@{
     96  /// Default Constructor
     97  AbcPrimalColumnPivot();
    9198
    92      ///@name Constructors and destructors
    93      //@{
    94      /// Default Constructor
    95      AbcPrimalColumnPivot();
     99  /// Copy constructor
     100  AbcPrimalColumnPivot(const AbcPrimalColumnPivot &);
    96101
    97      /// Copy constructor
    98      AbcPrimalColumnPivot(const AbcPrimalColumnPivot &);
     102  /// Assignment operator
     103  AbcPrimalColumnPivot &operator=(const AbcPrimalColumnPivot &rhs);
    99104
    100      /// Assignment operator
    101      AbcPrimalColumnPivot & operator=(const AbcPrimalColumnPivot& rhs);
     105  /// Destructor
     106  virtual ~AbcPrimalColumnPivot();
    102107
    103      /// Destructor
    104      virtual ~AbcPrimalColumnPivot ();
     108  /// Clone
     109  virtual AbcPrimalColumnPivot *clone(bool copyData = true) const = 0;
    105110
    106      /// Clone
    107      virtual AbcPrimalColumnPivot * clone(bool copyData = true) const = 0;
     111  //@}
    108112
    109      //@}
     113  ///@name Other
     114  //@{
     115  /// Returns model
     116  inline AbcSimplex *model()
     117  {
     118    return model_;
     119  }
     120  /// Sets model
     121  inline void setModel(AbcSimplex *newmodel)
     122  {
     123    model_ = newmodel;
     124  }
    110125
    111      ///@name Other
    112      //@{
    113      /// Returns model
    114      inline AbcSimplex * model() {
    115           return model_;
    116      }
    117      /// Sets model
    118      inline void setModel(AbcSimplex * newmodel) {
    119           model_ = newmodel;
    120      }
     126  /// Returns type (above 63 is extra information)
     127  inline int type()
     128  {
     129    return type_;
     130  }
    121131
    122      /// Returns type (above 63 is extra information)
    123      inline int type() {
    124           return type_;
    125      }
    126 
    127      /** Returns number of extra columns for sprint algorithm - 0 means off.
     132  /** Returns number of extra columns for sprint algorithm - 0 means off.
    128133         Also number of iterations before recompute
    129134     */
    130      virtual int numberSprintColumns(int & numberIterations) const;
    131      /// Switch off sprint idea
    132      virtual void switchOffSprint();
    133      /// Called when maximum pivots changes
    134      virtual void maximumPivotsChanged() {}
     135  virtual int numberSprintColumns(int &numberIterations) const;
     136  /// Switch off sprint idea
     137  virtual void switchOffSprint();
     138  /// Called when maximum pivots changes
     139  virtual void maximumPivotsChanged() {}
    135140
    136      //@}
     141  //@}
    137142
    138      //---------------------------------------------------------------------------
     143  //---------------------------------------------------------------------------
    139144
    140145protected:
    141      ///@name Protected member data
    142      //@{
    143      /// Pointer to model
    144      AbcSimplex * model_;
    145      /// Type of column pivot algorithm
    146      int type_;
    147      /// Says if looks optimal (normally computed)
    148      bool looksOptimal_;
    149      //@}
     146  ///@name Protected member data
     147  //@{
     148  /// Pointer to model
     149  AbcSimplex *model_;
     150  /// Type of column pivot algorithm
     151  int type_;
     152  /// Says if looks optimal (normally computed)
     153  bool looksOptimal_;
     154  //@}
    150155};
    151156#ifndef CLP_PRIMAL_SLACK_MULTIPLIER
     
    153158#endif
    154159#endif
     160
     161/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     162*/
Note: See TracChangeset for help on using the changeset viewer.