Cgl 0.60.2

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbcPrimalColumnPivot.hpp
Go to the documentation of this file.
1 /* $Id: AbcPrimalColumnPivot.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef AbcPrimalColumnPivot_H
7 #define AbcPrimalColumnPivot_H
8 #include "AbcCommon.hpp"
9
10 class AbcSimplex;
11 class CoinIndexedVector;
12
13 //#############################################################################
14
26 class AbcPrimalColumnPivot {
27
28 public:
30
31
50 virtual int pivotColumn(CoinPartitionedVector *updates,
51 CoinPartitionedVector *spareRow2,
52 CoinPartitionedVector *spareColumn1)
53 = 0;
54
56 virtual void updateWeights(CoinIndexedVector *input);
57
69 virtual void saveWeights(AbcSimplex *model, int mode) = 0;
75 virtual int pivotRow(double &way)
76 {
77 way = 0;
78 return -2;
79 }
81 virtual void clearArrays();
83 virtual bool looksOptimal() const
84 {
85 return looksOptimal_;
86 }
88 virtual void setLooksOptimal(bool flag)
89 {
90 looksOptimal_ = flag;
91 }
93
95
96 AbcPrimalColumnPivot();
98
100 AbcPrimalColumnPivot(const AbcPrimalColumnPivot &);
101
103 AbcPrimalColumnPivot &operator=(const AbcPrimalColumnPivot &rhs);
104
106 virtual ~AbcPrimalColumnPivot();
107
109 virtual AbcPrimalColumnPivot *clone(bool copyData = true) const = 0;
110
112
114
115 inline AbcSimplex *model()
117 {
118 return model_;
119 }
121 inline void setModel(AbcSimplex *newmodel)
122 {
123 model_ = newmodel;
124 }
125
127 inline int type()
128 {
129 return type_;
130 }
131
135 virtual int numberSprintColumns(int &numberIterations) const;
137 virtual void switchOffSprint();
139 virtual void maximumPivotsChanged() {}
140
142
143 //---------------------------------------------------------------------------
144
145 protected:
147
148 AbcSimplex *model_;
151 int type_;
153 bool looksOptimal_;
155 };
156 #ifndef CLP_PRIMAL_SLACK_MULTIPLIER
157 #define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
158 #endif
159 #endif
160
161 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
162 */
AbcPrimalColumnPivot::saveWeights
virtual void saveWeights(AbcSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
AbcPrimalColumnPivot
Primal Column Pivot Abstract Base Class.
Definition: AbcPrimalColumnPivot.hpp:26
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcPrimalColumnPivot::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: AbcPrimalColumnPivot.hpp:75
AbcPrimalColumnPivot::setModel
void setModel(AbcSimplex *newmodel)
Sets model.
Definition: AbcPrimalColumnPivot.hpp:121
AbcPrimalColumnPivot::~AbcPrimalColumnPivot
virtual ~AbcPrimalColumnPivot()
Destructor.
AbcPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
Definition: AbcPrimalColumnPivot.hpp:88
CoinPartitionedVector
Definition: CoinIndexedVector.hpp:1303
AbcPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
AbcPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1)=0
Returns pivot column, -1 if none.
AbcCommon.hpp
AbcPrimalColumnPivot::AbcPrimalColumnPivot
AbcPrimalColumnPivot()
Default Constructor.
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
AbcPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed)
Definition: AbcPrimalColumnPivot.hpp:153
AbcPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition: AbcPrimalColumnPivot.hpp:151
AbcPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition: AbcPrimalColumnPivot.hpp:83
AbcPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
AbcPrimalColumnPivot::model_
AbcSimplex * model_
Pointer to model.
Definition: AbcPrimalColumnPivot.hpp:149
AbcPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information)
Definition: AbcPrimalColumnPivot.hpp:127
AbcPrimalColumnPivot::model
AbcSimplex * model()
Returns model.
Definition: AbcPrimalColumnPivot.hpp:116
AbcPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition: AbcPrimalColumnPivot.hpp:139
AbcPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
AbcPrimalColumnPivot::clone
virtual AbcPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
AbcPrimalColumnPivot::operator=
AbcPrimalColumnPivot & operator=(const AbcPrimalColumnPivot &rhs)
Assignment operator.
AbcPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty)