ClpDualRowPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowPivot.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpDualRowPivot_H
5 #define ClpDualRowPivot_H
6 
7 class ClpSimplex;
8 class CoinIndexedVector;
9 
10 //#############################################################################
11 
21 
22 public:
23 
25 
26 
28  virtual int pivotRow() = 0;
29 
32  virtual double updateWeights(CoinIndexedVector * input,
33  CoinIndexedVector * spare,
34  CoinIndexedVector * spare2,
35  CoinIndexedVector * updatedColumn) = 0;
36 
43  /* FIXME: this was pure virtul (=0). Why? */
44  virtual void updatePrimalSolution(CoinIndexedVector * input,
45  double theta,
46  double & changeInObjective) = 0;
57  virtual void saveWeights(ClpSimplex * model, int mode);
59  virtual void checkAccuracy();
61  virtual void unrollWeights();
63  virtual void clearArrays();
65  virtual bool looksOptimal() const {
66  return false;
67  }
69  virtual void maximumPivotsChanged() {}
71 
72 
74 
77 
80 
83 
85  virtual ~ClpDualRowPivot ();
86 
88  virtual ClpDualRowPivot * clone(bool copyData = true) const = 0;
89 
91 
93 
94  inline ClpSimplex * model() {
96  return model_;
97  }
98 
100  inline void setModel(ClpSimplex * newmodel) {
101  model_ = newmodel;
102  }
103 
105  inline int type() {
106  return type_;
107  }
108 
110 
111  //---------------------------------------------------------------------------
112 
113 protected:
115 
116  ClpSimplex * model_;
119  int type_;
121 };
122 
123 #endif
Dual Row Pivot Abstract Base Class.
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
virtual ~ClpDualRowPivot()
Destructor.
void setModel(ClpSimplex *newmodel)
Sets model (normally to NULL)
virtual void checkAccuracy()
checks accuracy and may re-initialize (may be empty)
ClpDualRowPivot()
Default Constructor.
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)=0
Updates weights and returns pivot alpha.
ClpSimplex * model()
Returns model.
int type_
Type of row pivot algorithm.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:49
virtual bool looksOptimal() const
Returns true if would not find any row.
virtual void unrollWeights()
Gets rid of last update (may be empty)
virtual void updatePrimalSolution(CoinIndexedVector *input, double theta, double &changeInObjective)=0
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes ch...
virtual void clearArrays()
Gets rid of all arrays (may be empty)
ClpSimplex * model_
Pointer to model.
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
ClpDualRowPivot & operator=(const ClpDualRowPivot &rhs)
Assignment operator.
virtual int pivotRow()=0
Returns pivot row, -1 if none.
virtual ClpDualRowPivot * clone(bool copyData=true) const =0
Clone.
int type()
Returns type (above 63 is extra information)