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/ClpDualRowPivot.hpp

    r2070 r2385  
    2020*/
    2121
    22 class ClpDualRowPivot  {
     22class ClpDualRowPivot {
    2323
    2424public:
     25  ///@name Algorithmic methods
     26  //@{
    2527
    26      ///@name Algorithmic methods
    27      //@{
     28  /// Returns pivot row, -1 if none
     29  virtual int pivotRow() = 0;
    2830
    29      /// Returns pivot row, -1 if none
    30      virtual int pivotRow() = 0;
     31  /** Updates weights and returns pivot alpha.
     32         Also does FT update */
     33  virtual double updateWeights(CoinIndexedVector *input,
     34    CoinIndexedVector *spare,
     35    CoinIndexedVector *spare2,
     36    CoinIndexedVector *updatedColumn)
     37    = 0;
    3138
    32      /** Updates weights and returns pivot alpha.
    33          Also does FT update */
    34      virtual double updateWeights(CoinIndexedVector * input,
    35                                   CoinIndexedVector * spare,
    36                                   CoinIndexedVector * spare2,
    37                                   CoinIndexedVector * updatedColumn) = 0;
    38 
    39      /** Updates primal solution (and maybe list of candidates)
     39  /** Updates primal solution (and maybe list of candidates)
    4040         Uses input vector which it deletes
    4141         Computes change in objective function
     
    4343         means everything is always in sync
    4444     */
    45      /* FIXME: this was pure virtul (=0). Why? */
    46      virtual void updatePrimalSolution(CoinIndexedVector * input,
    47                                        double theta,
    48                                        double & changeInObjective) = 0;
    49      /** Saves any weights round factorization as pivot rows may change
     45  /* FIXME: this was pure virtul (=0). Why? */
     46  virtual void updatePrimalSolution(CoinIndexedVector *input,
     47    double theta,
     48    double &changeInObjective)
     49    = 0;
     50  /** Saves any weights round factorization as pivot rows may change
    5051         Will be empty unless steepest edge (will save model)
    5152         May also recompute infeasibility stuff
     
    5960         7) for strong branching - initialize full weights , infeasibilities
    6061     */
    61      virtual void saveWeights(ClpSimplex * model, int mode);
    62      /// checks accuracy and may re-initialize (may be empty)
    63      virtual void checkAccuracy();
    64      /// Gets rid of last update (may be empty)
    65      virtual void unrollWeights();
    66      /// Gets rid of all arrays (may be empty)
    67      virtual void clearArrays();
    68      /// Returns true if would not find any row
    69      virtual bool looksOptimal() const {
    70           return false;
    71      }
    72      /// Called when maximum pivots changes
    73      virtual void maximumPivotsChanged() {}
    74      //@}
     62  virtual void saveWeights(ClpSimplex *model, int mode);
     63  /// checks accuracy and may re-initialize (may be empty)
     64  virtual void checkAccuracy();
     65  /// Gets rid of last update (may be empty)
     66  virtual void unrollWeights();
     67  /// Gets rid of all arrays (may be empty)
     68  virtual void clearArrays();
     69  /// Returns true if would not find any row
     70  virtual bool looksOptimal() const
     71  {
     72    return false;
     73  }
     74  /// Called when maximum pivots changes
     75  virtual void maximumPivotsChanged() {}
     76  //@}
    7577
     78  ///@name Constructors and destructors
     79  //@{
     80  /// Default Constructor
     81  ClpDualRowPivot();
    7682
    77      ///@name Constructors and destructors
    78      //@{
    79      /// Default Constructor
    80      ClpDualRowPivot();
     83  /// Copy constructor
     84  ClpDualRowPivot(const ClpDualRowPivot &);
    8185
    82      /// Copy constructor
    83      ClpDualRowPivot(const ClpDualRowPivot &);
     86  /// Assignment operator
     87  ClpDualRowPivot &operator=(const ClpDualRowPivot &rhs);
    8488
    85      /// Assignment operator
    86      ClpDualRowPivot & operator=(const ClpDualRowPivot& rhs);
     89  /// Destructor
     90  virtual ~ClpDualRowPivot();
    8791
    88      /// Destructor
    89      virtual ~ClpDualRowPivot ();
     92  /// Clone
     93  virtual ClpDualRowPivot *clone(bool copyData = true) const = 0;
    9094
    91      /// Clone
    92      virtual ClpDualRowPivot * clone(bool copyData = true) const = 0;
     95  //@}
    9396
    94      //@}
     97  ///@name Other
     98  //@{
     99  /// Returns model
     100  inline ClpSimplex *model()
     101  {
     102    return model_;
     103  }
    95104
    96      ///@name Other
    97      //@{
    98      /// Returns model
    99      inline ClpSimplex * model() {
    100           return model_;
    101      }
     105  /// Sets model (normally to NULL)
     106  inline void setModel(ClpSimplex *newmodel)
     107  {
     108    model_ = newmodel;
     109  }
    102110
    103      /// Sets model (normally to NULL)
    104      inline void setModel(ClpSimplex * newmodel) {
    105           model_ = newmodel;
    106      }
     111  /// Returns type (above 63 is extra information)
     112  inline int type()
     113  {
     114    return type_;
     115  }
    107116
    108      /// Returns type (above 63 is extra information)
    109      inline int type() {
    110           return type_;
    111      }
     117  //@}
    112118
    113      //@}
    114 
    115      //---------------------------------------------------------------------------
     119  //---------------------------------------------------------------------------
    116120
    117121protected:
    118      ///@name Protected member data
    119      //@{
    120      /// Pointer to model
    121      ClpSimplex * model_;
    122      /// Type of row pivot algorithm
    123      int type_;
    124      //@}
     122  ///@name Protected member data
     123  //@{
     124  /// Pointer to model
     125  ClpSimplex *model_;
     126  /// Type of row pivot algorithm
     127  int type_;
     128  //@}
    125129};
    126130#ifndef CLP_DUAL_COLUMN_MULTIPLIER
     
    128132#endif
    129133#endif
     134
     135/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     136*/
Note: See TracChangeset for help on using the changeset viewer.