#include <CoinDenseFactorization.hpp>
Public Member Functions | |
Constructors and destructor and copy | |
CoinSmallFactorization () | |
Default constructor. | |
CoinSmallFactorization (const CoinSmallFactorization &other) | |
Copy constructor. | |
virtual | ~CoinSmallFactorization () |
Destructor. | |
CoinSmallFactorization & | operator= (const CoinSmallFactorization &other) |
= copy | |
virtual CoinSmallFactorization * | clone () const =0 |
Clone. | |
general stuff such as status | |
int | status () const |
Returns status. | |
void | setStatus (int value) |
Sets status. | |
int | pivots () const |
Returns number of pivots since factorization. | |
void | setPivots (int value) |
Sets number of pivots since factorization. | |
void | setNumberRows (int value) |
Set number of Rows after factorization. | |
int | numberRows () const |
Number of Rows after factorization. | |
int | numberColumns () const |
Total number of columns in factorization. | |
int | numberGoodColumns () const |
Number of good columns in factorization. | |
void | relaxAccuracyCheck (double value) |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed. | |
double | getAccuracyCheck () const |
Returns status. | |
int | maximumPivots () const |
Maximum number of pivots between factorizations. | |
void | maximumPivots (int value) |
Set maximum pivots. | |
double | pivotTolerance () const |
Pivot tolerance. | |
void | pivotTolerance (double value) |
Returns status. | |
double | zeroTolerance () const |
Zero tolerance. | |
void | zeroTolerance (double value) |
Returns status. | |
double | slackValue () const |
Whether slack value is +1 or -1. | |
void | slackValue (double value) |
Returns status. | |
CoinFactorizationDouble * | elements () const |
Returns array to put basis elements in. | |
int * | pivotRow () const |
Returns pivot row. | |
CoinFactorizationDouble * | workArea () const |
Returns work area. | |
int * | intWorkArea () const |
Returns int work area. | |
CoinBigIndex * | starts () const |
Returns array to put basis starts in. | |
int * | permuteBack () const |
Returns permute back. | |
int | solveMode () const |
Get solve mode e.g. 0 C++ code, 1 Lapack, -1 choose. | |
void | setSolveMode (int value) |
Set solve mode e.g. 0 C++ code, 1 Lapack, -1 choose. | |
virtual general stuff such as permutation | |
virtual int * | indices () const =0 |
Returns array to put basis indices in. | |
virtual int * | permute () const =0 |
Returns permute in. | |
virtual int | numberElements () const =0 |
Total number of elements in factorization. | |
Do factorization - public | |
virtual void | getAreas (int numberRows, int numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)=0 |
Gets space for a factorization. | |
virtual void | preProcess ()=0 |
PreProcesses column ordered copy of basis. | |
virtual int | factor ()=0 |
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)=0 |
Does post processing on valid factorization - putting variables on correct rows. | |
virtual void | makeNonSingular (int *sequence, int numberColumns)=0 |
Makes a non-singular basis by replacing variables. | |
rank one updates which do exist | |
virtual int | replaceColumn (CoinIndexedVector *regionSparse, int pivotRow, double pivotCheck, bool checkBeforeModifying=false)=0 |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If checkBeforeModifying is true will do all accuracy checks before modifying factorization. | |
various uses of factorization (return code number elements) | |
which user may want to know about | |
virtual int | updateColumnFT (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false)=0 |
Updates one column (FTRAN) from regionSparse2 Tries to do FT update number returned is negative if no room regionSparse starts as zero and is zero at end. | |
virtual int | updateColumn (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const =0 |
This version has same effect as above with FTUpdate==false so number returned is always >=0. | |
virtual int | updateTwoColumnsFT (CoinIndexedVector *regionSparse1, CoinIndexedVector *regionSparse2, CoinIndexedVector *regionSparse3, bool noPermute=false)=0 |
does FTRAN on two columns | |
virtual int | updateColumnTranspose (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const =0 |
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - if regionSparse2 packed on input - will be packed on output. | |
Protected Attributes | |
data | |
double | pivotTolerance_ |
Pivot tolerance. | |
double | zeroTolerance_ |
Zero tolerance. | |
double | slackValue_ |
Whether slack value is +1 or -1. | |
double | relaxCheck_ |
Relax check on accuracy in replaceColumn. | |
CoinBigIndex | factorElements_ |
Number of elements after factorization. | |
int | numberRows_ |
Number of Rows in factorization. | |
int | numberColumns_ |
Number of Columns in factorization. | |
int | numberGoodU_ |
Number factorized in U (not row singletons). | |
int | maximumPivots_ |
Maximum number of pivots before factorization. | |
int | numberPivots_ |
Number pivots since last factorization. | |
int | status_ |
Status of factorization. | |
int | maximumRows_ |
Maximum rows ever (i.e. use to copy arrays etc). | |
CoinBigIndex | maximumSpace_ |
Maximum length of iterating area. | |
int * | pivotRow_ |
Pivot row. | |
CoinFactorizationDouble * | elements_ |
Elements of factorization and updates length is maxR*maxR+maxSpace will always be long enough so can have nR*nR ints in maxSpace. | |
CoinFactorizationDouble * | workArea_ |
Work area of numberRows_. | |
int | solveMode_ |
Solve mode e.g. 0 C++ code, 1 Lapack, -1 choose. |
Definition at line 21 of file CoinDenseFactorization.hpp.
CoinSmallFactorization::CoinSmallFactorization | ( | ) |
Default constructor.
CoinSmallFactorization::CoinSmallFactorization | ( | const CoinSmallFactorization & | other | ) |
Copy constructor.
virtual CoinSmallFactorization::~CoinSmallFactorization | ( | ) | [virtual] |
Destructor.
CoinSmallFactorization& CoinSmallFactorization::operator= | ( | const CoinSmallFactorization & | other | ) |
= copy
virtual CoinSmallFactorization* CoinSmallFactorization::clone | ( | ) | const [pure virtual] |
int CoinSmallFactorization::status | ( | ) | const [inline] |
void CoinSmallFactorization::setStatus | ( | int | value | ) | [inline] |
int CoinSmallFactorization::pivots | ( | ) | const [inline] |
Returns number of pivots since factorization.
Definition at line 51 of file CoinDenseFactorization.hpp.
void CoinSmallFactorization::setPivots | ( | int | value | ) | [inline] |
Sets number of pivots since factorization.
Definition at line 55 of file CoinDenseFactorization.hpp.
void CoinSmallFactorization::setNumberRows | ( | int | value | ) | [inline] |
int CoinSmallFactorization::numberRows | ( | ) | const [inline] |
int CoinSmallFactorization::numberColumns | ( | ) | const [inline] |
int CoinSmallFactorization::numberGoodColumns | ( | ) | const [inline] |
void CoinSmallFactorization::relaxAccuracyCheck | ( | double | value | ) | [inline] |
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
Definition at line 73 of file CoinDenseFactorization.hpp.
double CoinSmallFactorization::getAccuracyCheck | ( | ) | const [inline] |
int CoinSmallFactorization::maximumPivots | ( | ) | const [inline] |
Maximum number of pivots between factorizations.
Definition at line 78 of file CoinDenseFactorization.hpp.
void CoinSmallFactorization::maximumPivots | ( | int | value | ) |
Set maximum pivots.
double CoinSmallFactorization::pivotTolerance | ( | ) | const [inline] |
void CoinSmallFactorization::pivotTolerance | ( | double | value | ) |
Returns status.
double CoinSmallFactorization::zeroTolerance | ( | ) | const [inline] |
void CoinSmallFactorization::zeroTolerance | ( | double | value | ) |
Returns status.
double CoinSmallFactorization::slackValue | ( | ) | const [inline] |
void CoinSmallFactorization::slackValue | ( | double | value | ) |
Returns status.
CoinFactorizationDouble* CoinSmallFactorization::elements | ( | ) | const [inline] |
int* CoinSmallFactorization::pivotRow | ( | ) | const [inline] |
CoinFactorizationDouble* CoinSmallFactorization::workArea | ( | ) | const [inline] |
int* CoinSmallFactorization::intWorkArea | ( | ) | const [inline] |
CoinBigIndex* CoinSmallFactorization::starts | ( | ) | const [inline] |
int* CoinSmallFactorization::permuteBack | ( | ) | const [inline] |
int CoinSmallFactorization::solveMode | ( | ) | const [inline] |
Get solve mode e.g. 0 C++ code, 1 Lapack, -1 choose.
Definition at line 120 of file CoinDenseFactorization.hpp.
void CoinSmallFactorization::setSolveMode | ( | int | value | ) | [inline] |
Set solve mode e.g. 0 C++ code, 1 Lapack, -1 choose.
Definition at line 123 of file CoinDenseFactorization.hpp.
virtual int* CoinSmallFactorization::indices | ( | ) | const [pure virtual] |
Returns array to put basis indices in.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int* CoinSmallFactorization::permute | ( | ) | const [pure virtual] |
virtual int CoinSmallFactorization::numberElements | ( | ) | const [pure virtual] |
Total number of elements in factorization.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual void CoinSmallFactorization::getAreas | ( | int | numberRows, | |
int | numberColumns, | |||
CoinBigIndex | maximumL, | |||
CoinBigIndex | maximumU | |||
) | [pure virtual] |
virtual void CoinSmallFactorization::preProcess | ( | ) | [pure virtual] |
PreProcesses column ordered copy of basis.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int CoinSmallFactorization::factor | ( | ) | [pure virtual] |
Does most of factorization returning status 0 - OK -99 - needs more memory -1 - singular - use numberGoodColumns and redo.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual void CoinSmallFactorization::postProcess | ( | const int * | sequence, | |
int * | pivotVariable | |||
) | [pure virtual] |
Does post processing on valid factorization - putting variables on correct rows.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual void CoinSmallFactorization::makeNonSingular | ( | int * | sequence, | |
int | numberColumns | |||
) | [pure virtual] |
Makes a non-singular basis by replacing variables.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int CoinSmallFactorization::replaceColumn | ( | CoinIndexedVector * | regionSparse, | |
int | pivotRow, | |||
double | pivotCheck, | |||
bool | checkBeforeModifying = false | |||
) | [pure virtual] |
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If checkBeforeModifying is true will do all accuracy checks before modifying factorization.
Whether to set this depends on speed considerations. You could just do this on first iteration after factorization and thereafter re-factorize partial update already in U
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int CoinSmallFactorization::updateColumnFT | ( | CoinIndexedVector * | regionSparse, | |
CoinIndexedVector * | regionSparse2, | |||
bool | noPermute = false | |||
) | [pure virtual] |
Updates one column (FTRAN) from regionSparse2 Tries to do FT update number returned is negative if no room regionSparse starts as zero and is zero at end.
Note - if regionSparse2 packed on input - will be packed on output
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int CoinSmallFactorization::updateColumn | ( | CoinIndexedVector * | regionSparse, | |
CoinIndexedVector * | regionSparse2, | |||
bool | noPermute = false | |||
) | const [pure virtual] |
This version has same effect as above with FTUpdate==false so number returned is always >=0.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
virtual int CoinSmallFactorization::updateTwoColumnsFT | ( | CoinIndexedVector * | regionSparse1, | |
CoinIndexedVector * | regionSparse2, | |||
CoinIndexedVector * | regionSparse3, | |||
bool | noPermute = false | |||
) | [pure virtual] |
virtual int CoinSmallFactorization::updateColumnTranspose | ( | CoinIndexedVector * | regionSparse, | |
CoinIndexedVector * | regionSparse2 | |||
) | const [pure virtual] |
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - if regionSparse2 packed on input - will be packed on output.
Implemented in CoinDenseFactorization, and CoinSimpFactorization.
double CoinSmallFactorization::pivotTolerance_ [protected] |
double CoinSmallFactorization::zeroTolerance_ [protected] |
double CoinSmallFactorization::slackValue_ [protected] |
double CoinSmallFactorization::relaxCheck_ [protected] |
Relax check on accuracy in replaceColumn.
Definition at line 221 of file CoinDenseFactorization.hpp.
CoinBigIndex CoinSmallFactorization::factorElements_ [protected] |
int CoinSmallFactorization::numberRows_ [protected] |
int CoinSmallFactorization::numberColumns_ [protected] |
int CoinSmallFactorization::numberGoodU_ [protected] |
Number factorized in U (not row singletons).
Definition at line 229 of file CoinDenseFactorization.hpp.
int CoinSmallFactorization::maximumPivots_ [protected] |
Maximum number of pivots before factorization.
Definition at line 231 of file CoinDenseFactorization.hpp.
int CoinSmallFactorization::numberPivots_ [protected] |
int CoinSmallFactorization::status_ [protected] |
int CoinSmallFactorization::maximumRows_ [protected] |
Maximum rows ever (i.e. use to copy arrays etc).
Definition at line 237 of file CoinDenseFactorization.hpp.
CoinBigIndex CoinSmallFactorization::maximumSpace_ [protected] |
int* CoinSmallFactorization::pivotRow_ [protected] |
CoinFactorizationDouble* CoinSmallFactorization::elements_ [protected] |
Elements of factorization and updates length is maxR*maxR+maxSpace will always be long enough so can have nR*nR ints in maxSpace.
Definition at line 246 of file CoinDenseFactorization.hpp.
CoinFactorizationDouble* CoinSmallFactorization::workArea_ [protected] |
int CoinSmallFactorization::solveMode_ [protected] |
Solve mode e.g. 0 C++ code, 1 Lapack, -1 choose.
Definition at line 250 of file CoinDenseFactorization.hpp.