Loading...
Searching...
No Matches
CoinAbcDenseFactorization Class Reference

This deals with Factorization and Updates This is a simple dense version so other people can write a better one. More...

`#include <CoinAbcDenseFactorization.hpp>`

Inheritance diagram for CoinAbcDenseFactorization:
[legend]
Collaboration diagram for CoinAbcDenseFactorization:
[legend]

## Public Member Functions

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)
which user may want to know about
virtual int | updateColumnFT (CoinIndexedVector &regionSparse)
| Updates one column (FTRAN) from unpacked regionSparse Tries to do FT update number returned is negative if no room.
virtual int | updateColumnFTPart1 (CoinIndexedVector &regionSparse)
virtual void | updateColumnFTPart2 (CoinIndexedVector &)
virtual void | updateColumnFT (CoinIndexedVector &regionSparseFT, CoinIndexedVector &, int)
virtual int | updateColumn (CoinIndexedVector &regionSparse) const
| This version has same effect as above with FTUpdate==false so number returned is always >=0.
virtual int | updateTwoColumnsFT (CoinIndexedVector &regionFT, CoinIndexedVector &regionOther)
| does FTRAN on two unpacked columns
virtual int | updateColumnTranspose (CoinIndexedVector &regionSparse) const
| Updates one column (BTRAN) from unpacked regionSparse.
virtual void | updateFullColumn (CoinIndexedVector &regionSparse) const
| This version does FTRAN on array when indices not set up.
virtual void | updateFullColumnTranspose (CoinIndexedVector &regionSparse) const
| Updates one column (BTRAN) from unpacked regionSparse.
virtual void | updateWeights (CoinIndexedVector &regionSparse) const
| Updates one column for dual steepest edge weights (FTRAN).
Public Member Functions inherited from CoinAbcAnyFactorization
| CoinAbcAnyFactorization ()
| Default constructor.
| CoinAbcAnyFactorization (const CoinAbcAnyFactorization &other)
| Copy constructor.
virtual | ~CoinAbcAnyFactorization ()
| Destructor.
CoinAbcAnyFactorization & | operator= (const CoinAbcAnyFactorization &other)
| = copy
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.
int | numberSlacks () const
| Returns number of slacks.
void | setNumberSlacks (int value)
| Sets number of slacks.
void | setNumberRows (int value)
| Set number of Rows after factorization.
int | numberRows () const
| Number of Rows after factorization.
CoinSimplexInt | numberDense () const
| Number of dense rows after 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
int | maximumPivots () const
| Maximum number of pivots between factorizations.
virtual void | maximumPivots (int value)
| Set maximum pivots.
double | pivotTolerance () const
| Pivot tolerance.
void | pivotTolerance (double value)
double | minimumPivotTolerance () const
| Minimum pivot tolerance.
void | minimumPivotTolerance (double value)
virtual CoinFactorizationDouble * | pivotRegion () const
double | areaFactor () const
| Area factor.
void | areaFactor (CoinSimplexDouble value)
double | zeroTolerance () const
| Zero tolerance.
void | zeroTolerance (double value)
virtual CoinFactorizationDouble * | elements () const
| Returns array to put basis elements in.
virtual int * | pivotRow () const
| Returns pivot row.
virtual CoinFactorizationDouble * | workArea () const
| Returns work area.
virtual int * | intWorkArea () const
| Returns int work area.
virtual int * | numberInRow () const
| Number of entries in each row.
virtual int * | numberInColumn () const
| Number of entries in each column.
virtual CoinBigIndex * | starts () const
| Returns array to put basis starts in.
virtual int * | permuteBack () const
| Returns permute back.
virtual void | goSparse ()
| Sees whether to go sparse.
virtual void | checkMarkArrays () const
int | solveMode () const
| Get solve mode e.g.
void | setSolveMode (int value)
| Set solve mode e.g.
virtual bool | wantsTableauColumn () const
| Returns true if wants tableauColumn in replaceColumn.
virtual void | setUsefulInformation (const int *info, int whereFrom)
| Useful information for factorization 0 - iteration number whereFrom is 0 for factorize and 1 for replaceColumn.
virtual int * | pivotColumn () const
| Returns pivotColumn or permute.
virtual double | checkReplacePart1 (CoinIndexedVector *, int)
| Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial update already in U.
virtual double | checkReplacePart1 (CoinIndexedVector *, CoinIndexedVector *, int)
virtual void | checkReplacePart1a (CoinIndexedVector *, int)
virtual double | checkReplacePart1b (CoinIndexedVector *, int)
virtual void | updateColumnCpu (CoinIndexedVector &regionSparse, int whichCpu) const
| Updates one column (FTRAN).
virtual void | updateColumnTransposeCpu (CoinIndexedVector &regionSparse, int whichCpu) const
| Updates one column (BTRAN).

## Friends

void | CoinAbcDenseFactorizationUnitTest (const std::string &mpsDir)

## various uses of factorization

*** Below this user may not want to know about which user may not want to know about (left over from my LP code)
CoinBigIndex | maximumSpace_
| Maximum length of iterating area.
CoinSimplexInt | maximumRowsAdjusted_
| Use for array size to get multiple of 8.
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.
void | gutsOfDestructor ()
| The real work of desstructor.
void | gutsOfInitialize ()
| The real work of constructor.
void | gutsOfCopy (const CoinAbcDenseFactorization &other)
| The real work of copy.
int | checkPivot (double saveFromU, double oldPivot) const
| Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.

## Additional Inherited Members

Protected Attributes inherited from CoinAbcAnyFactorization
double | pivotTolerance_
| Pivot tolerance.
double | minimumPivotTolerance_
| Minimum pivot tolerance.
double | areaFactor_
| Area factor.
double | zeroTolerance_
| Zero tolerance.
double | relaxCheck_
| Relax check on accuracy in replaceColumn.
CoinBigIndex | factorElements_
| Number of elements after factorization.
int | numberRows_
| Number of Rows in factorization.
int | numberDense_
| Number of dense rows 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 | numberSlacks_
| Number slacks.
int | status_
| Status of factorization.
int | maximumRows_
| Maximum rows ever (i.e. use to copy arrays etc).
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.

## Detailed Description

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 442 of file CoinAbcDenseFactorization.hpp.

## Constructor & Destructor Documentation

## CoinAbcDenseFactorization() [1/2]

CoinAbcDenseFactorization::CoinAbcDenseFactorization | ( |  | ) |

Default constructor.

## CoinAbcDenseFactorization() [2/2]

CoinAbcDenseFactorization::CoinAbcDenseFactorization | ( | const CoinAbcDenseFactorization & | other | ) |

Copy constructor.

## ~CoinAbcDenseFactorization()

virtual CoinAbcDenseFactorization::~CoinAbcDenseFactorization | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## operator=()

CoinAbcDenseFactorization & CoinAbcDenseFactorization::operator= | ( | const CoinAbcDenseFactorization & | other | ) |

= copy

## clone()

virtual CoinAbcAnyFactorization * CoinAbcDenseFactorization::clone | ( |  | ) | const

virtual

Clone.

Implements CoinAbcAnyFactorization.

## getAreas()

virtual void CoinAbcDenseFactorization::getAreas | ( | int | numberRows,
|  | int | numberColumns,
|  | CoinBigIndex | maximumL,
|  | CoinBigIndex | maximumU )

virtual

Gets space for a factorization.

Implements CoinAbcAnyFactorization.

## preProcess()

virtual void CoinAbcDenseFactorization::preProcess | ( |  | ) |

virtual

PreProcesses column ordered copy of basis.

Implements CoinAbcAnyFactorization.

## factor()

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.

## postProcess()

virtual void CoinAbcDenseFactorization::postProcess | ( | const int * | sequence,
|  | int * | pivotVariable )

virtual

Does post processing on valid factorization - putting variables on correct rows.

Implements CoinAbcAnyFactorization.

## makeNonSingular()

virtual void CoinAbcDenseFactorization::makeNonSingular | ( | int * | sequence | ) |

virtual

Makes a non-singular basis by replacing variables.

Implements CoinAbcAnyFactorization.

## numberElements()

virtual int CoinAbcDenseFactorization::numberElements | ( |  | ) | const

inline virtual

Total number of elements in factorization.

Implements CoinAbcAnyFactorization.

Definition at line 486 of file CoinAbcDenseFactorization.hpp.

## maximumCoefficient()

double CoinAbcDenseFactorization::maximumCoefficient | ( |  | ) | const

Returns maximum absolute value in factorization.

## replaceColumn()

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.

## checkReplacePart2()

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.

## replaceColumnPart3() [1/2]

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.

## replaceColumnPart3() [2/2]

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 528 of file CoinAbcDenseFactorization.hpp.

## updateColumnFT() [1/2]

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 549 of file CoinAbcDenseFactorization.hpp.

## updateColumnFTPart1()

virtual int CoinAbcDenseFactorization::updateColumnFTPart1 | ( | CoinIndexedVector & | regionSparse | ) |

inline virtual

Implements CoinAbcAnyFactorization.

Definition at line 553 of file CoinAbcDenseFactorization.hpp.

## updateColumnFTPart2()

virtual void CoinAbcDenseFactorization::updateColumnFTPart2 | ( | CoinIndexedVector & |  | ) |

inline virtual

Implements CoinAbcAnyFactorization.

Definition at line 557 of file CoinAbcDenseFactorization.hpp.

## updateColumnFT() [2/2]

virtual void CoinAbcDenseFactorization::updateColumnFT | ( | CoinIndexedVector & | regionSparseFT,
|  | CoinIndexedVector & | ,
|  | int | )

inline virtual

Implements CoinAbcAnyFactorization.

Definition at line 560 of file CoinAbcDenseFactorization.hpp.

## updateColumn()

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.

## updateTwoColumnsFT()

virtual int CoinAbcDenseFactorization::updateTwoColumnsFT | ( | CoinIndexedVector & | regionFT,
|  | CoinIndexedVector & | regionOther )

virtual

does FTRAN on two unpacked columns

Implements CoinAbcAnyFactorization.

## updateColumnTranspose()

virtual int CoinAbcDenseFactorization::updateColumnTranspose | ( | CoinIndexedVector & | regionSparse | ) | const

virtual

Updates one column (BTRAN) from unpacked regionSparse.

Implements CoinAbcAnyFactorization.

## updateFullColumn()

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 574 of file CoinAbcDenseFactorization.hpp.

## updateFullColumnTranspose()

virtual void CoinAbcDenseFactorization::updateFullColumnTranspose | ( | CoinIndexedVector & | regionSparse | ) | const

inline virtual

Updates one column (BTRAN) from unpacked regionSparse.

Implements CoinAbcAnyFactorization.

Definition at line 580 of file CoinAbcDenseFactorization.hpp.

## updateWeights()

virtual void CoinAbcDenseFactorization::updateWeights | ( | CoinIndexedVector & | regionSparse | ) | const

virtual

Updates one column for dual steepest edge weights (FTRAN).

Implements CoinAbcAnyFactorization.

## clearArrays()

void CoinAbcDenseFactorization::clearArrays | ( |  | ) |

inline virtual

Get rid of all memory.

Reimplemented from CoinAbcAnyFactorization.

Definition at line 593 of file CoinAbcDenseFactorization.hpp.

## indices()

virtual int * CoinAbcDenseFactorization::indices | ( |  | ) | const

inline virtual

Returns array to put basis indices in.

Implements CoinAbcAnyFactorization.

Definition at line 598 of file CoinAbcDenseFactorization.hpp.

## permute()

virtual int * CoinAbcDenseFactorization::permute | ( |  | ) | const

inline virtual

Returns permute in.

Implements CoinAbcAnyFactorization.

Definition at line 603 of file CoinAbcDenseFactorization.hpp.

## gutsOfDestructor()

void CoinAbcDenseFactorization::gutsOfDestructor | ( |  | ) |

The real work of desstructor.

## gutsOfInitialize()

void CoinAbcDenseFactorization::gutsOfInitialize | ( |  | ) |

The real work of constructor.

## gutsOfCopy()

void CoinAbcDenseFactorization::gutsOfCopy | ( | const CoinAbcDenseFactorization & | other | ) |

The real work of copy.

## checkPivot()

int CoinAbcDenseFactorization::checkPivot | ( | double | saveFromU,
|  | double | oldPivot ) const

protected

Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.

## Friends And Related Symbol Documentation

## CoinAbcDenseFactorizationUnitTest

void CoinAbcDenseFactorizationUnitTest | ( | const std::string & | mpsDir | ) |

friend

## Member Data Documentation

## maximumSpace_

CoinBigIndex CoinAbcDenseFactorization::maximumSpace_

protected

Maximum length of iterating area.

Definition at line 625 of file CoinAbcDenseFactorization.hpp.

## maximumRowsAdjusted_

CoinSimplexInt CoinAbcDenseFactorization::maximumRowsAdjusted_

protected

Use for array size to get multiple of 8.

Definition at line 627 of file CoinAbcDenseFactorization.hpp.

The documentation for this class was generated from the following file:

- Clp/src/CoinAbcDenseFactorization.hpp