Clp 1.17.6

- 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
AbcDualRowPivot.hpp
Go to the documentation of this file.
1 /* $Id: AbcDualRowPivot.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 AbcDualRowPivot_H
7 #define AbcDualRowPivot_H
8 #include "AbcCommon.hpp"
9
10 class AbcSimplex;
11 class CoinIndexedVector;
12
13 //#############################################################################
14
23 class AbcDualRowPivot {
24
25 public:
27
28
30 virtual int pivotRow() = 0;
31
34 virtual double updateWeights1(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
35 virtual void updateWeightsOnly(CoinIndexedVector &input) = 0;
36 virtual double updateWeights(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
38 virtual void updateWeights2(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
39
45 virtual void updatePrimalSolution(CoinIndexedVector &updateColumn,
46 double theta)
47 = 0;
48 virtual void updatePrimalSolutionAndWeights(CoinIndexedVector &weightsVector,
49 CoinIndexedVector &updateColumn,
50 double theta);
61 virtual void saveWeights(AbcSimplex *model, int mode);
63 virtual void recomputeInfeasibilities();
65 virtual void checkAccuracy();
67 virtual void clearArrays();
69 virtual bool looksOptimal() const
70 {
71 return false;
72 }
74
76
77 AbcDualRowPivot();
79
81 AbcDualRowPivot(const AbcDualRowPivot &);
82
84 AbcDualRowPivot &operator=(const AbcDualRowPivot &rhs);
85
87 virtual ~AbcDualRowPivot();
88
90 virtual AbcDualRowPivot *clone(bool copyData = true) const = 0;
91
93
95
96 inline AbcSimplex *model()
98 {
99 return model_;
100 }
101
103 inline void setModel(AbcSimplex *newmodel)
104 {
105 model_ = newmodel;
106 }
107
109 inline int type()
110 {
111 return type_;
112 }
113
115
116 //---------------------------------------------------------------------------
117
118 protected:
120
121 AbcSimplex *model_;
124 int type_;
126 };
127 #ifndef CLP_DUAL_COLUMN_MULTIPLIER
128 //#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
129 #endif
130 #endif
131
132 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
133 */
AbcDualRowPivot::checkAccuracy
virtual void checkAccuracy()
checks accuracy and may re-initialize (may be empty)
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcDualRowPivot::updateWeightsOnly
virtual void updateWeightsOnly(CoinIndexedVector &input)=0
AbcDualRowPivot::updateWeights
virtual double updateWeights(CoinIndexedVector &input, CoinIndexedVector &updateColumn)=0
AbcDualRowPivot::pivotRow
virtual int pivotRow()=0
Returns pivot row, -1 if none.
AbcDualRowPivot::updatePrimalSolutionAndWeights
virtual void updatePrimalSolutionAndWeights(CoinIndexedVector &weightsVector, CoinIndexedVector &updateColumn, double theta)
AbcDualRowPivot::updateWeights1
virtual double updateWeights1(CoinIndexedVector &input, CoinIndexedVector &updateColumn)=0
Does most of work for weights and returns pivot alpha.
AbcDualRowPivot
Dual Row Pivot Abstract Base Class.
Definition: AbcDualRowPivot.hpp:23
AbcCommon.hpp
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
AbcDualRowPivot::operator=
AbcDualRowPivot & operator=(const AbcDualRowPivot &rhs)
Assignment operator.
AbcDualRowPivot::setModel
void setModel(AbcSimplex *newmodel)
Sets model (normally to NULL)
Definition: AbcDualRowPivot.hpp:103
AbcDualRowPivot::type
int type()
Returns type (above 63 is extra information)
Definition: AbcDualRowPivot.hpp:109
AbcDualRowPivot::AbcDualRowPivot
AbcDualRowPivot()
Default Constructor.
AbcDualRowPivot::recomputeInfeasibilities
virtual void recomputeInfeasibilities()
Recompute infeasibilities.
AbcDualRowPivot::model_
AbcSimplex * model_
Pointer to model.
Definition: AbcDualRowPivot.hpp:122
AbcDualRowPivot::updatePrimalSolution
virtual void updatePrimalSolution(CoinIndexedVector &updateColumn, double theta)=0
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Would be fa...
AbcDualRowPivot::updateWeights2
virtual void updateWeights2(CoinIndexedVector &input, CoinIndexedVector &updateColumn)=0
Actually updates weights.
AbcDualRowPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any row.
Definition: AbcDualRowPivot.hpp:69
AbcDualRowPivot::model
AbcSimplex * model()
Returns model.
Definition: AbcDualRowPivot.hpp:97
AbcDualRowPivot::type_
int type_
Type of row pivot algorithm.
Definition: AbcDualRowPivot.hpp:124
AbcDualRowPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
AbcDualRowPivot::saveWeights
virtual void saveWeights(AbcSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
AbcDualRowPivot::~AbcDualRowPivot
virtual ~AbcDualRowPivot()
Destructor.
AbcDualRowPivot::clone
virtual AbcDualRowPivot * clone(bool copyData=true) const =0
Clone.