ClpPrimalColumnPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpPrimalColumnPivot.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 ClpPrimalcolumnPivot_H
5 #define ClpPrimalcolumnPivot_H
6 
7 class ClpSimplex;
8 class CoinIndexedVector;
9 
10 //#############################################################################
11 
24 
25 public:
26 
28 
29 
48  virtual int pivotColumn(CoinIndexedVector * updates,
49  CoinIndexedVector * spareRow1,
50  CoinIndexedVector * spareRow2,
51  CoinIndexedVector * spareColumn1,
52  CoinIndexedVector * spareColumn2) = 0;
53 
55  virtual void updateWeights(CoinIndexedVector * input);
56 
68  virtual void saveWeights(ClpSimplex * model, int mode) = 0;
74  virtual int pivotRow(double & way) {
75  way = 0;
76  return -2;
77  }
79  virtual void clearArrays();
81  virtual bool looksOptimal() const {
82  return looksOptimal_;
83  }
85  virtual void setLooksOptimal(bool flag) {
86  looksOptimal_ = flag;
87  }
89 
90 
92 
95 
98 
101 
103  virtual ~ClpPrimalColumnPivot ();
104 
106  virtual ClpPrimalColumnPivot * clone(bool copyData = true) const = 0;
107 
109 
111 
112  inline ClpSimplex * model() {
114  return model_;
115  }
117  inline void setModel(ClpSimplex * newmodel) {
118  model_ = newmodel;
119  }
120 
122  inline int type() {
123  return type_;
124  }
125 
129  virtual int numberSprintColumns(int & numberIterations) const;
131  virtual void switchOffSprint();
133  virtual void maximumPivotsChanged() {}
134 
136 
137  //---------------------------------------------------------------------------
138 
139 protected:
141 
142  ClpSimplex * model_;
145  int type_;
149 };
150 
151 #endif
virtual void switchOffSprint()
Switch off sprint idea.
virtual ~ClpPrimalColumnPivot()
Destructor.
bool looksOptimal_
Says if looks optimal (normally computed)
void setModel(ClpSimplex *newmodel)
Sets model.
ClpPrimalColumnPivot()
Default Constructor.
Primal Column Pivot Abstract Base Class.
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty)
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
virtual int pivotColumn(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
Returns pivot column, -1 if none.
ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot &rhs)
Assignment operator.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:49
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
ClpSimplex * model()
Returns model.
int type_
Type of column pivot algorithm.
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
virtual void clearArrays()
Gets rid of all arrays (may be empty)
virtual bool looksOptimal() const
Returns true if would not find any column.
virtual int pivotRow(double &way)
Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (w...
int type()
Returns type (above 63 is extra information)
virtual void saveWeights(ClpSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
virtual ClpPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
ClpSimplex * model_
Pointer to model.