- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

ClpPrimalColumnPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpPrimalColumnPivot.hpp 1732 2011-05-31 08:09:41Z forrest $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef ClpPrimalcolumnPivot_H
7 #define ClpPrimalcolumnPivot_H
8
9 class ClpSimplex;
10 class CoinIndexedVector;
11
12 //#############################################################################
13
25 class ClpPrimalColumnPivot {
26
27 public:
28
30
31
50 virtual int pivotColumn(CoinIndexedVector * updates,
51 CoinIndexedVector * spareRow1,
52 CoinIndexedVector * spareRow2,
53 CoinIndexedVector * spareColumn1,
54 CoinIndexedVector * spareColumn2) = 0;
55
57 virtual void updateWeights(CoinIndexedVector * input);
58
70 virtual void saveWeights(ClpSimplex * model, int mode) = 0;
76 virtual int pivotRow(double & way) {
77 way = 0;
78 return -2;
79 }
81 virtual void clearArrays();
83 virtual bool looksOptimal() const {
84 return looksOptimal_;
85 }
87 virtual void setLooksOptimal(bool flag) {
88 looksOptimal_ = flag;
89 }
91
92
94
95 ClpPrimalColumnPivot();
97
99 ClpPrimalColumnPivot(const ClpPrimalColumnPivot &);
100
102 ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot& rhs);
103
105 virtual ~ClpPrimalColumnPivot ();
106
108 virtual ClpPrimalColumnPivot * clone(bool copyData = true) const = 0;
109
111
113
114 inline ClpSimplex * model() {
116 return model_;
117 }
119 inline void setModel(ClpSimplex * newmodel) {
120 model_ = newmodel;
121 }
122
124 inline int type() {
125 return type_;
126 }
127
131 virtual int numberSprintColumns(int & numberIterations) const;
133 virtual void switchOffSprint();
135 virtual void maximumPivotsChanged() {}
136
138
139 //---------------------------------------------------------------------------
140
141 protected:
143
144 ClpSimplex * model_;
147 int type_;
149 bool looksOptimal_;
151 };
152 #ifndef CLP_PRIMAL_SLACK_MULTIPLIER
153 #define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
154 #endif
155 #endif
ClpPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
ClpPrimalColumnPivot::~ClpPrimalColumnPivot
virtual ~ClpPrimalColumnPivot()
Destructor.
ClpPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed)
Definition: ClpPrimalColumnPivot.hpp:149
ClpPrimalColumnPivot::setModel
void setModel(ClpSimplex *newmodel)
Sets model.
Definition: ClpPrimalColumnPivot.hpp:119
ClpPrimalColumnPivot::ClpPrimalColumnPivot
ClpPrimalColumnPivot()
Default Constructor.
ClpPrimalColumnPivot
Primal Column Pivot Abstract Base Class.
Definition: ClpPrimalColumnPivot.hpp:25
ClpPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty)
ClpPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition: ClpPrimalColumnPivot.hpp:135
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
ClpPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
Returns pivot column, -1 if none.
ClpPrimalColumnPivot::operator=
ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot &rhs)
Assignment operator.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
Definition: ClpPrimalColumnPivot.hpp:87
ClpPrimalColumnPivot::model
ClpSimplex * model()
Returns model.
Definition: ClpPrimalColumnPivot.hpp:115
ClpPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition: ClpPrimalColumnPivot.hpp:147
ClpPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
ClpPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
ClpPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition: ClpPrimalColumnPivot.hpp:83
ClpPrimalColumnPivot::pivotRow
virtual int pivotRow(double &way)
Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (w...
Definition: ClpPrimalColumnPivot.hpp:76
ClpPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information)
Definition: ClpPrimalColumnPivot.hpp:124
ClpPrimalColumnPivot::saveWeights
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...
ClpPrimalColumnPivot::clone
virtual ClpPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
ClpPrimalColumnPivot::model_
ClpSimplex * model_
Pointer to model.
Definition: ClpPrimalColumnPivot.hpp:145