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

    r2149 r2385  
    99#include "ClpDualRowPivot.hpp"
    1010class CoinIndexedVector;
    11 
    1211
    1312//#############################################################################
     
    2221
    2322public:
     23  ///@name Algorithmic methods
     24  //@{
    2425
    25      ///@name Algorithmic methods
    26      //@{
     26  /// Returns pivot row, -1 if none
     27  virtual int pivotRow();
    2728
    28      /// Returns pivot row, -1 if none
    29      virtual int pivotRow();
     29  /** Updates weights and returns pivot alpha.
     30         Also does FT update */
     31  virtual double updateWeights(CoinIndexedVector *input,
     32    CoinIndexedVector *spare,
     33    CoinIndexedVector *spare2,
     34    CoinIndexedVector *updatedColumn);
    3035
    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 
    38      /** Updates primal solution (and maybe list of candidates)
     36  /** Updates primal solution (and maybe list of candidates)
    3937         Uses input vector which it deletes
    4038         Computes change in objective function
    4139     */
    42      virtual void updatePrimalSolution(CoinIndexedVector * input,
    43                                        double theta,
    44                                        double & changeInObjective);
     40  virtual void updatePrimalSolution(CoinIndexedVector *input,
     41    double theta,
     42    double &changeInObjective);
    4543
    46      /** Saves any weights round factorization as pivot rows may change
     44  /** Saves any weights round factorization as pivot rows may change
    4745         Save model
    4846         May also recompute infeasibility stuff
     
    5452         5) for strong branching - initialize (uninitialized) , infeasibilities
    5553     */
    56      virtual void saveWeights(ClpSimplex * model, int mode);
    57      /// Pass in saved weights
    58      void passInSavedWeights(const CoinIndexedVector * saved);
    59      /// Get saved weights
    60      inline CoinIndexedVector * savedWeights()
    61      { return savedWeights_;}
    62      /// Gets rid of last update
    63      virtual void unrollWeights();
    64      /// Gets rid of all arrays
    65      virtual void clearArrays();
    66      /// Returns true if would not find any row
    67      virtual bool looksOptimal() const;
    68      /// Called when maximum pivots changes
    69      virtual void maximumPivotsChanged();
    70      //@}
     54  virtual void saveWeights(ClpSimplex *model, int mode);
     55  /// Pass in saved weights
     56  void passInSavedWeights(const CoinIndexedVector *saved);
     57  /// Get saved weights
     58  inline CoinIndexedVector *savedWeights()
     59  {
     60    return savedWeights_;
     61  }
     62  /// Gets rid of last update
     63  virtual void unrollWeights();
     64  /// Gets rid of all arrays
     65  virtual void clearArrays();
     66  /// Returns true if would not find any row
     67  virtual bool looksOptimal() const;
     68  /// Called when maximum pivots changes
     69  virtual void maximumPivotsChanged();
     70  //@}
    7171
    72      /** enums for persistence
     72  /** enums for persistence
    7373     */
    74      enum Persistence {
    75           normal = 0x00, // create (if necessary) and destroy
    76           keep = 0x01 // create (if necessary) and leave
    77      };
     74  enum Persistence {
     75    normal = 0x00, // create (if necessary) and destroy
     76    keep = 0x01 // create (if necessary) and leave
     77  };
    7878
    79      ///@name Constructors and destructors
    80      //@{
    81      /** Default Constructor
     79  ///@name Constructors and destructors
     80  //@{
     81  /** Default Constructor
    8282         0 is uninitialized, 1 full, 2 is partial uninitialized,
    8383         3 starts as 2 but may switch to 1.
     
    8686         This can be faster on very easy problems.
    8787     */
    88      ClpDualRowSteepest(int mode = 3);
     88  ClpDualRowSteepest(int mode = 3);
    8989
    90      /// Copy constructor
    91      ClpDualRowSteepest(const ClpDualRowSteepest &);
     90  /// Copy constructor
     91  ClpDualRowSteepest(const ClpDualRowSteepest &);
    9292
    93      /// Assignment operator
    94      ClpDualRowSteepest & operator=(const ClpDualRowSteepest& rhs);
     93  /// Assignment operator
     94  ClpDualRowSteepest &operator=(const ClpDualRowSteepest &rhs);
    9595
    96      /// Fill most values
    97      void fill(const ClpDualRowSteepest& rhs);
     96  /// Fill most values
     97  void fill(const ClpDualRowSteepest &rhs);
    9898
    99      /// Destructor
    100      virtual ~ClpDualRowSteepest ();
     99  /// Destructor
     100  virtual ~ClpDualRowSteepest();
    101101
    102      /// Clone
    103      virtual ClpDualRowPivot * clone(bool copyData = true) const;
     102  /// Clone
     103  virtual ClpDualRowPivot *clone(bool copyData = true) const;
    104104
    105      //@}
    106      /**@name gets and sets */
    107      //@{
    108      /// Mode
    109      inline int mode() const {
    110           return mode_;
    111      }
    112      /// Set mode
    113      inline void setMode(int mode) {
    114           mode_ = mode;
    115      }
    116      /// Set/ get persistence
    117      inline void setPersistence(Persistence life) {
    118           persistence_ = life;
    119      }
    120      inline Persistence persistence() const {
    121           return persistence_ ;
    122      }
    123 //@}
     105  //@}
     106  /**@name gets and sets */
     107  //@{
     108  /// Mode
     109  inline int mode() const
     110  {
     111    return mode_;
     112  }
     113  /// Set mode
     114  inline void setMode(int mode)
     115  {
     116    mode_ = mode;
     117  }
     118  /// Set/ get persistence
     119  inline void setPersistence(Persistence life)
     120  {
     121    persistence_ = life;
     122  }
     123  inline Persistence persistence() const
     124  {
     125    return persistence_;
     126  }
     127  //@}
    124128
    125      //---------------------------------------------------------------------------
     129  //---------------------------------------------------------------------------
    126130
    127131protected:
    128      ///@name Protected member data
    129      /** Status
     132  ///@name Protected member data
     133  /** Status
    130134         0) Normal
    131135         -1) Needs initialization
    132136         1) Weights are stored by sequence number
    133137     */
    134      int state_;
    135      /** If 0 then we are using uninitialized weights, 1 then full,
     138  int state_;
     139  /** If 0 then we are using uninitialized weights, 1 then full,
    136140         if 2 then uninitialized partial, 3 switchable */
    137      int mode_;
    138      /// Life of weights
    139      Persistence persistence_;
    140      /// weight array
    141      double * weights_;
    142      /// square of infeasibility array (just for infeasible rows)
    143      CoinIndexedVector * infeasible_;
    144      /// alternate weight array (so we can unroll)
    145      CoinIndexedVector * alternateWeights_;
    146      /// save weight array (so we can use checkpoint)
    147      CoinIndexedVector * savedWeights_;
    148      /// Dubious weights
    149      int * dubiousWeights_;
    150      //@}
     141  int mode_;
     142  /// Life of weights
     143  Persistence persistence_;
     144  /// weight array
     145  double *weights_;
     146  /// square of infeasibility array (just for infeasible rows)
     147  CoinIndexedVector *infeasible_;
     148  /// alternate weight array (so we can unroll)
     149  CoinIndexedVector *alternateWeights_;
     150  /// save weight array (so we can use checkpoint)
     151  CoinIndexedVector *savedWeights_;
     152  /// Dubious weights
     153  int *dubiousWeights_;
     154  //@}
    151155};
    152156
    153157#endif
     158
     159/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     160*/
Note: See TracChangeset for help on using the changeset viewer.