Cgl 0.59.7

- 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 1910 2013-01-27 02:00:13Z stefan $ */
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:
29
31
32
51 virtual int pivotColumn(CoinPartitionedVector * updates,
52 CoinPartitionedVector * spareRow2,
53 CoinPartitionedVector * spareColumn1) = 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 way = 0;
77 return -2;
78 }
80 virtual void clearArrays();
82 virtual bool looksOptimal() const {
83 return looksOptimal_;
84 }
86 virtual void setLooksOptimal(bool flag) {
87 looksOptimal_ = flag;
88 }
90
91
93
94 AbcPrimalColumnPivot();
96
98 AbcPrimalColumnPivot(const AbcPrimalColumnPivot &);
99
101 AbcPrimalColumnPivot & operator=(const AbcPrimalColumnPivot& rhs);
102
104 virtual ~AbcPrimalColumnPivot ();
105
107 virtual AbcPrimalColumnPivot * clone(bool copyData = true) const = 0;
108
110
112
113 inline AbcSimplex * model() {
115 return model_;
116 }
118 inline void setModel(AbcSimplex * newmodel) {
119 model_ = newmodel;
120 }
121
123 inline int type() {
124 return type_;
125 }
126
130 virtual int numberSprintColumns(int & numberIterations) const;
132 virtual void switchOffSprint();
134 virtual void maximumPivotsChanged() {}
135
137
138 //---------------------------------------------------------------------------
139
140 protected:
142
143 AbcSimplex * model_;
146 int type_;
148 bool looksOptimal_;
150 };
151 #ifndef CLP_PRIMAL_SLACK_MULTIPLIER
152 #define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
153 #endif
154 #endif
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:118
AbcPrimalColumnPivot::~AbcPrimalColumnPivot
virtual ~AbcPrimalColumnPivot()
Destructor.
AbcPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
Definition: AbcPrimalColumnPivot.hpp:86
CoinPartitionedVector
Definition: CoinIndexedVector.hpp:1057
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:148
AbcPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition: AbcPrimalColumnPivot.hpp:146
AbcPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition: AbcPrimalColumnPivot.hpp:82
AbcPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
AbcPrimalColumnPivot::model_
AbcSimplex * model_
Pointer to model.
Definition: AbcPrimalColumnPivot.hpp:144
AbcPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information)
Definition: AbcPrimalColumnPivot.hpp:123
AbcPrimalColumnPivot::model
AbcSimplex * model()
Returns model.
Definition: AbcPrimalColumnPivot.hpp:114
AbcPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition: AbcPrimalColumnPivot.hpp:134
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)