Loading...
Searching...
No Matches
AbcDualRowPivot.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2002, International Business Machines
// Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef AbcDualRowPivot_H
#define AbcDualRowPivot_H
#include "AbcCommon.hpp"
class AbcSimplex;
class CoinIndexedVector;
//#############################################################################
class AbcDualRowPivot {
public:
virtual int pivotRow() = 0;
virtual double updateWeights1(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
virtual void updateWeightsOnly(CoinIndexedVector &input) = 0;
virtual double updateWeights(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
virtual void updateWeights2(CoinIndexedVector &input, CoinIndexedVector &updateColumn) = 0;
virtual void updatePrimalSolution(CoinIndexedVector &updateColumn,
double theta)
= 0;
virtual void updatePrimalSolutionAndWeights(CoinIndexedVector &weightsVector,
CoinIndexedVector &updateColumn,
double theta);
virtual void saveWeights(AbcSimplex *model, int mode);
virtual void recomputeInfeasibilities();
virtual void checkAccuracy();
virtual void clearArrays();
virtual bool looksOptimal() const
{
return false;
}
AbcDualRowPivot();
AbcDualRowPivot(const AbcDualRowPivot &);
AbcDualRowPivot &operator=(const AbcDualRowPivot &rhs);
virtual ~AbcDualRowPivot();
virtual AbcDualRowPivot *clone(bool copyData = true) const = 0;
inline AbcSimplex *model()
{
return model_;
}
inline void setModel(AbcSimplex *newmodel)
{
model_ = newmodel;
}
inline int type()
{
return type_;
}
//---------------------------------------------------------------------------
protected:
AbcSimplex *model_;
int type_;
};
#ifndef CLP_DUAL_COLUMN_MULTIPLIER
//#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
#endif
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
AbcCommon.hpp
AbcSimplex
#define AbcSimplex
Definition AbcWarmStart.hpp:16
AbcDualRowPivot::model
AbcSimplex * model()
Returns model.
Definition AbcDualRowPivot.hpp:97
AbcDualRowPivot::~AbcDualRowPivot
virtual ~AbcDualRowPivot()
Destructor.
AbcDualRowPivot::setModel
void setModel(AbcSimplex *newmodel)
Sets model (normally to NULL).
Definition AbcDualRowPivot.hpp:103
AbcDualRowPivot::type_
int type_
Type of row pivot algorithm.
Definition AbcDualRowPivot.hpp:124
AbcDualRowPivot::updateWeights2
virtual void updateWeights2(CoinIndexedVector &input, CoinIndexedVector &updateColumn)=0
Actually updates weights.
AbcDualRowPivot::operator=
AbcDualRowPivot & operator=(const AbcDualRowPivot &rhs)
Assignment operator.
AbcDualRowPivot::type
int type()
Returns type (above 63 is extra information).
Definition AbcDualRowPivot.hpp:109
AbcDualRowPivot::model_
AbcSimplex * model_
Pointer to model.
Definition AbcDualRowPivot.hpp:122
AbcDualRowPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any row.
Definition AbcDualRowPivot.hpp:69
AbcDualRowPivot::updateWeights1
virtual double updateWeights1(CoinIndexedVector &input, CoinIndexedVector &updateColumn)=0
Does most of work for weights and returns pivot alpha.
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::clone
virtual AbcDualRowPivot * clone(bool copyData=true) const =0
Clone.
AbcDualRowPivot::AbcDualRowPivot
AbcDualRowPivot(const AbcDualRowPivot &)
Copy constructor.
AbcDualRowPivot::AbcDualRowPivot
AbcDualRowPivot()
Default Constructor.
AbcDualRowPivot::checkAccuracy
virtual void checkAccuracy()
checks accuracy and may re-initialize (may be empty)
AbcDualRowPivot::updatePrimalSolutionAndWeights
virtual void updatePrimalSolutionAndWeights(CoinIndexedVector &weightsVector, CoinIndexedVector &updateColumn, double theta)
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::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty).
AbcDualRowPivot::recomputeInfeasibilities
virtual void recomputeInfeasibilities()
Recompute infeasibilities.
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...