This deals with Factorization and Updates This is a simple dense version so other people can write a better one. More...
#include <CoinAbcDenseFactorization.hpp>
Public Member Functions | |
void | gutsOfDestructor () |
The real work of desstructor. | |
void | gutsOfInitialize () |
The real work of constructor. | |
void | gutsOfCopy (const CoinAbcDenseFactorization &other) |
The real work of copy. | |
Constructors and destructor and copy | |
CoinAbcDenseFactorization () | |
Default constructor. | |
CoinAbcDenseFactorization (const CoinAbcDenseFactorization &other) | |
Copy constructor. | |
virtual | ~CoinAbcDenseFactorization () |
Destructor. | |
CoinAbcDenseFactorization & | operator= (const CoinAbcDenseFactorization &other) |
= copy | |
virtual CoinAbcAnyFactorization * | clone () const |
Clone. | |
Do factorization - public | |
virtual void | getAreas (int numberRows, int numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU) |
Gets space for a factorization. | |
virtual void | preProcess () |
PreProcesses column ordered copy of basis. | |
virtual int | factor (AbcSimplex *model) |
Does most of factorization returning status 0 - OK -99 - needs more memory -1 - singular - use numberGoodColumns and redo. | |
virtual void | postProcess (const int *sequence, int *pivotVariable) |
Does post processing on valid factorization - putting variables on correct rows. | |
virtual void | makeNonSingular (int *sequence) |
Makes a non-singular basis by replacing variables. | |
general stuff such as number of elements | |
virtual int | numberElements () const |
Total number of elements in factorization. | |
double | maximumCoefficient () const |
Returns maximum absolute value in factorization. | |
rank one updates which do exist | |
virtual int | replaceColumn (CoinIndexedVector *regionSparse, int pivotRow, double pivotCheck, bool skipBtranU=false, double acceptablePivot=1.0e-8) |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If skipBtranU is false will do btran part partial update already in U. | |
virtual int | checkReplacePart2 (int pivotRow, double btranAlpha, double ftranAlpha, double ftAlpha, double acceptablePivot=1.0e-8) |
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots. | |
virtual void | replaceColumnPart3 (const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha) |
Replaces one Column to basis, partial update already in U. | |
virtual void | replaceColumnPart3 (const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, CoinIndexedVector *, int pivotRow, double alpha) |
Replaces one Column to basis, partial update in vector. | |
various uses of factorization (return code number elements) | |
virtual int | updateColumnFT (CoinIndexedVector ®ionSparse) |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room. | |
virtual int | updateColumnFTPart1 (CoinIndexedVector ®ionSparse) |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room. | |
virtual void | updateColumnFTPart2 (CoinIndexedVector &) |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room. | |
virtual void | updateColumnFT (CoinIndexedVector ®ionSparseFT, CoinIndexedVector &, int) |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room. | |
virtual int | updateColumn (CoinIndexedVector ®ionSparse) const |
This version has same effect as above with FTUpdate==false so number returned is always >=0. | |
virtual int | updateTwoColumnsFT (CoinIndexedVector ®ionFT, CoinIndexedVector ®ionOther) |
does FTRAN on two unpacked columns | |
virtual int | updateColumnTranspose (CoinIndexedVector ®ionSparse) const |
Updates one column (BTRAN) from unpacked regionSparse. | |
virtual void | updateFullColumn (CoinIndexedVector ®ionSparse) const |
This version does FTRAN on array when indices not set up. | |
virtual void | updateFullColumnTranspose (CoinIndexedVector ®ionSparse) const |
Updates one column (BTRAN) from unpacked regionSparse. | |
virtual void | updateWeights (CoinIndexedVector ®ionSparse) const |
Updates one column for dual steepest edge weights (FTRAN). | |
various uses of factorization | |
void | clearArrays () |
Get rid of all memory. | |
virtual int * | indices () const |
Returns array to put basis indices in. | |
virtual int * | permute () const |
Returns permute in. | |
Protected Member Functions | |
int | checkPivot (double saveFromU, double oldPivot) const |
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular. | |
Protected Attributes | |
CoinBigIndex | maximumSpace_ |
Maximum length of iterating area. | |
CoinSimplexInt | maximumRowsAdjusted_ |
Use for array size to get multiple of 8. | |
Friends | |
void | CoinAbcDenseFactorizationUnitTest (const std::string &mpsDir) |
This deals with Factorization and Updates This is a simple dense version so other people can write a better one.
I am assuming that 32 bits is enough for number of rows or columns, but CoinBigIndex may be redefined to get 64 bits.
Definition at line 394 of file CoinAbcDenseFactorization.hpp.
CoinAbcDenseFactorization::CoinAbcDenseFactorization | ( | ) |
Default constructor.
CoinAbcDenseFactorization::CoinAbcDenseFactorization | ( | const CoinAbcDenseFactorization & | other | ) |
Copy constructor.
virtual CoinAbcDenseFactorization::~CoinAbcDenseFactorization | ( | ) | [virtual] |
Destructor.
CoinAbcDenseFactorization& CoinAbcDenseFactorization::operator= | ( | const CoinAbcDenseFactorization & | other | ) |
= copy
Reimplemented from CoinAbcAnyFactorization.
virtual CoinAbcAnyFactorization* CoinAbcDenseFactorization::clone | ( | ) | const [virtual] |
Clone.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::getAreas | ( | int | numberRows, | |
int | numberColumns, | |||
CoinBigIndex | maximumL, | |||
CoinBigIndex | maximumU | |||
) | [virtual] |
Gets space for a factorization.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::preProcess | ( | ) | [virtual] |
PreProcesses column ordered copy of basis.
Implements CoinAbcAnyFactorization.
virtual int CoinAbcDenseFactorization::factor | ( | AbcSimplex * | model | ) | [virtual] |
Does most of factorization returning status 0 - OK -99 - needs more memory -1 - singular - use numberGoodColumns and redo.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::postProcess | ( | const int * | sequence, | |
int * | pivotVariable | |||
) | [virtual] |
Does post processing on valid factorization - putting variables on correct rows.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::makeNonSingular | ( | int * | sequence | ) | [virtual] |
Makes a non-singular basis by replacing variables.
Implements CoinAbcAnyFactorization.
virtual int CoinAbcDenseFactorization::numberElements | ( | ) | const [inline, virtual] |
Total number of elements in factorization.
Implements CoinAbcAnyFactorization.
Definition at line 439 of file CoinAbcDenseFactorization.hpp.
double CoinAbcDenseFactorization::maximumCoefficient | ( | ) | const |
Returns maximum absolute value in factorization.
virtual int CoinAbcDenseFactorization::replaceColumn | ( | CoinIndexedVector * | regionSparse, | |
int | pivotRow, | |||
double | pivotCheck, | |||
bool | skipBtranU = false , |
|||
double | acceptablePivot = 1.0e-8 | |||
) | [virtual] |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If skipBtranU is false will do btran part partial update already in U.
virtual int CoinAbcDenseFactorization::checkReplacePart2 | ( | int | pivotRow, | |
double | btranAlpha, | |||
double | ftranAlpha, | |||
double | ftAlpha, | |||
double | acceptablePivot = 1.0e-8 | |||
) | [virtual] |
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::replaceColumnPart3 | ( | const AbcSimplex * | model, | |
CoinIndexedVector * | regionSparse, | |||
CoinIndexedVector * | tableauColumn, | |||
int | pivotRow, | |||
double | alpha | |||
) | [virtual] |
Replaces one Column to basis, partial update already in U.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::replaceColumnPart3 | ( | const AbcSimplex * | model, | |
CoinIndexedVector * | regionSparse, | |||
CoinIndexedVector * | tableauColumn, | |||
CoinIndexedVector * | , | |||
int | pivotRow, | |||
double | alpha | |||
) | [inline, virtual] |
Replaces one Column to basis, partial update in vector.
Implements CoinAbcAnyFactorization.
Definition at line 480 of file CoinAbcDenseFactorization.hpp.
virtual int CoinAbcDenseFactorization::updateColumnFT | ( | CoinIndexedVector & | regionSparse | ) | [inline, virtual] |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room.
Implements CoinAbcAnyFactorization.
Definition at line 499 of file CoinAbcDenseFactorization.hpp.
virtual int CoinAbcDenseFactorization::updateColumnFTPart1 | ( | CoinIndexedVector & | regionSparse | ) | [inline, virtual] |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room.
Implements CoinAbcAnyFactorization.
Definition at line 501 of file CoinAbcDenseFactorization.hpp.
virtual void CoinAbcDenseFactorization::updateColumnFTPart2 | ( | CoinIndexedVector & | ) | [inline, virtual] |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room.
Implements CoinAbcAnyFactorization.
Definition at line 503 of file CoinAbcDenseFactorization.hpp.
virtual void CoinAbcDenseFactorization::updateColumnFT | ( | CoinIndexedVector & | regionSparseFT, | |
CoinIndexedVector & | , | |||
int | ||||
) | [inline, virtual] |
Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room.
Implements CoinAbcAnyFactorization.
Definition at line 505 of file CoinAbcDenseFactorization.hpp.
virtual int CoinAbcDenseFactorization::updateColumn | ( | CoinIndexedVector & | regionSparse | ) | const [virtual] |
This version has same effect as above with FTUpdate==false so number returned is always >=0.
Implements CoinAbcAnyFactorization.
virtual int CoinAbcDenseFactorization::updateTwoColumnsFT | ( | CoinIndexedVector & | regionFT, | |
CoinIndexedVector & | regionOther | |||
) | [virtual] |
does FTRAN on two unpacked columns
Implements CoinAbcAnyFactorization.
virtual int CoinAbcDenseFactorization::updateColumnTranspose | ( | CoinIndexedVector & | regionSparse | ) | const [virtual] |
Updates one column (BTRAN) from unpacked regionSparse.
Implements CoinAbcAnyFactorization.
virtual void CoinAbcDenseFactorization::updateFullColumn | ( | CoinIndexedVector & | regionSparse | ) | const [inline, virtual] |
This version does FTRAN on array when indices not set up.
Implements CoinAbcAnyFactorization.
Definition at line 517 of file CoinAbcDenseFactorization.hpp.
virtual void CoinAbcDenseFactorization::updateFullColumnTranspose | ( | CoinIndexedVector & | regionSparse | ) | const [inline, virtual] |
Updates one column (BTRAN) from unpacked regionSparse.
Implements CoinAbcAnyFactorization.
Definition at line 521 of file CoinAbcDenseFactorization.hpp.
virtual void CoinAbcDenseFactorization::updateWeights | ( | CoinIndexedVector & | regionSparse | ) | const [virtual] |
Updates one column for dual steepest edge weights (FTRAN).
Implements CoinAbcAnyFactorization.
void CoinAbcDenseFactorization::clearArrays | ( | ) | [inline, virtual] |
Get rid of all memory.
Reimplemented from CoinAbcAnyFactorization.
Definition at line 532 of file CoinAbcDenseFactorization.hpp.
virtual int* CoinAbcDenseFactorization::indices | ( | ) | const [inline, virtual] |
Returns array to put basis indices in.
Implements CoinAbcAnyFactorization.
Definition at line 535 of file CoinAbcDenseFactorization.hpp.
virtual int* CoinAbcDenseFactorization::permute | ( | ) | const [inline, virtual] |
Returns permute in.
Implements CoinAbcAnyFactorization.
Definition at line 538 of file CoinAbcDenseFactorization.hpp.
void CoinAbcDenseFactorization::gutsOfDestructor | ( | ) |
The real work of desstructor.
void CoinAbcDenseFactorization::gutsOfInitialize | ( | ) |
The real work of constructor.
void CoinAbcDenseFactorization::gutsOfCopy | ( | const CoinAbcDenseFactorization & | other | ) |
The real work of copy.
int CoinAbcDenseFactorization::checkPivot | ( | double | saveFromU, | |
double | oldPivot | |||
) | const [protected] |
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.
void CoinAbcDenseFactorizationUnitTest | ( | const std::string & | mpsDir | ) | [friend] |
CoinBigIndex CoinAbcDenseFactorization::maximumSpace_ [protected] |
Maximum length of iterating area.
Definition at line 557 of file CoinAbcDenseFactorization.hpp.
Use for array size to get multiple of 8.
Definition at line 559 of file CoinAbcDenseFactorization.hpp.