# CoinOslFactorization Class Reference

`#include <CoinOslFactorization.hpp>`

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

List of all members.

## Public Member Functions
void | gutsOfDestructor (bool clearFact=true)
| The real work of desstructor.
void | gutsOfInitialize (bool zapFact=true)
| The real work of constructor.
void | gutsOfCopy (const CoinOslFactorization &other)
| The real work of copy.
Constructors and destructor and copy
| CoinOslFactorization ()
| Default constructor.
| CoinOslFactorization (const CoinOslFactorization &other)
| Copy constructor.
virtual | ~CoinOslFactorization ()
| Destructor.
CoinOslFactorization & | operator= (const CoinOslFactorization &other)
| = copy
virtual CoinOtherFactorization * | 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 ()
| 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, int numberColumns)
| Makes a non-singular basis by replacing variables.
int | factorize (const CoinPackedMatrix &matrix, int rowIsBasic[], int columnIsBasic[], double areaFactor=0.0)
| When part of LP - given by basic variables.
general stuff such as number of elements
virtual int | numberElements () const
| Total number of elements in factorization.
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 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 void | maximumPivots (int value)
| Set maximum pivots.
double | maximumCoefficient () const
| Returns maximum absolute value in factorization.
double | conditionNumber () const
| Condition number - product of pivots after factorization.
virtual void | clearArrays ()
| Get rid of all memory.
rank one updates which do exist
virtual int | replaceColumn (CoinIndexedVector *regionSparse, int pivotRow, double pivotCheck, bool checkBeforeModifying=false, double acceptablePivot=1.0e-8)
| 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)
| 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
| 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)
| does FTRAN on two columns
virtual int | updateColumnTranspose (CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const
| 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.
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)
virtual int * | indices () const
| Get rid of all memory.
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
data
EKKfactinfo | factInfo_
| Osl factorization data.
## Friends
void | CoinOslFactorizationUnitTest (const std::string &mpsDir)

## Detailed Description

Definition at line 106 of file CoinOslFactorization.hpp.

## Constructor & Destructor Documentation

CoinOslFactorization::CoinOslFactorization | ( |  | ) |

Default constructor.

CoinOslFactorization::CoinOslFactorization | ( | const CoinOslFactorization & | other | ) |

Copy constructor.

virtual CoinOslFactorization::~CoinOslFactorization | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

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

= copy

Reimplemented from CoinOtherFactorization.

virtual CoinOtherFactorization* CoinOslFactorization::clone | ( |  | ) | const`[virtual]`

Clone.

Implements CoinOtherFactorization.

virtual void CoinOslFactorization::getAreas | ( | int | numberRows,
|  | int | numberColumns,
|  | CoinBigIndex | maximumL,
|  | CoinBigIndex | maximumU |
| ) |  |  | `[virtual]`

Gets space for a factorization.

Implements CoinOtherFactorization.

virtual void CoinOslFactorization::preProcess | ( |  | ) | `[virtual]`

PreProcesses column ordered copy of basis.

Implements CoinOtherFactorization.

virtual int CoinOslFactorization::factor | ( |  | ) | `[virtual]`

Does most of factorization returning status 0 - OK -99 - needs more memory -1 - singular - use numberGoodColumns and redo.

Implements CoinOtherFactorization.

virtual void CoinOslFactorization::postProcess | ( | const int * | sequence,
|  | int * | pivotVariable |
| ) |  |  | `[virtual]`

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

Implements CoinOtherFactorization.

virtual void CoinOslFactorization::makeNonSingular | ( | int * | sequence,
|  | int | numberColumns |
| ) |  |  | `[virtual]`

Makes a non-singular basis by replacing variables.

Implements CoinOtherFactorization.

int CoinOslFactorization::factorize | ( | const CoinPackedMatrix & | matrix,
|  | int | rowIsBasic[],
|  | int | columnIsBasic[],
|  | double | areaFactor = `0.0` |
| ) |  |  |

When part of LP - given by basic variables.

Actually does factorization. Arrays passed in have non negative value to say basic. If status is okay, basic variables have pivot row - this is only needed If status is singular, then basic variables have pivot row and ones thrown out have -1 returns 0 -okay, -1 singular, -2 too many in basis, -99 memory

virtual int CoinOslFactorization::numberElements | ( |  | ) | const`[inline, virtual]`

Total number of elements in factorization.

Implements CoinOtherFactorization.

Definition at line 161 of file CoinOslFactorization.hpp.

virtual CoinFactorizationDouble* CoinOslFactorization::elements | ( |  | ) | const`[virtual]`

Returns array to put basis elements in.

Reimplemented from CoinOtherFactorization.

virtual int* CoinOslFactorization::pivotRow | ( |  | ) | const`[virtual]`

Returns pivot row.

Reimplemented from CoinOtherFactorization.

virtual CoinFactorizationDouble* CoinOslFactorization::workArea | ( |  | ) | const`[virtual]`

Returns work area.

Reimplemented from CoinOtherFactorization.

virtual int* CoinOslFactorization::intWorkArea | ( |  | ) | const`[virtual]`

Returns int work area.

Reimplemented from CoinOtherFactorization.

virtual int* CoinOslFactorization::numberInRow | ( |  | ) | const`[virtual]`

Number of entries in each row.

Reimplemented from CoinOtherFactorization.

virtual int* CoinOslFactorization::numberInColumn | ( |  | ) | const`[virtual]`

Number of entries in each column.

Reimplemented from CoinOtherFactorization.

virtual CoinBigIndex* CoinOslFactorization::starts | ( |  | ) | const`[virtual]`

Returns array to put basis starts in.

Reimplemented from CoinOtherFactorization.

virtual int* CoinOslFactorization::permuteBack | ( |  | ) | const`[virtual]`

Returns permute back.

Reimplemented from CoinOtherFactorization.

virtual bool CoinOslFactorization::wantsTableauColumn | ( |  | ) | const`[virtual]`

Returns true if wants tableauColumn in replaceColumn.

Reimplemented from CoinOtherFactorization.

virtual void CoinOslFactorization::setUsefulInformation | ( | const int * | info,
|  | int | whereFrom |
| ) |  |  | `[virtual]`

Useful information for factorization 0 - iteration number whereFrom is 0 for factorize and 1 for replaceColumn.

Reimplemented from CoinOtherFactorization.

virtual void CoinOslFactorization::maximumPivots | ( | int | value | ) | `[virtual]`

Set maximum pivots.

Reimplemented from CoinOtherFactorization.

double CoinOslFactorization::maximumCoefficient | ( |  | ) | const

Returns maximum absolute value in factorization.

double CoinOslFactorization::conditionNumber | ( |  | ) | const

Condition number - product of pivots after factorization.

virtual void CoinOslFactorization::clearArrays | ( |  | ) | `[virtual]`

Get rid of all memory.

Reimplemented from CoinOtherFactorization.

virtual int CoinOslFactorization::replaceColumn | ( | CoinIndexedVector * | regionSparse,
|  | int | pivotRow,
|  | double | pivotCheck,
|  | bool | checkBeforeModifying = `false`,
|  | double | acceptablePivot = `1.0e-8` |
| ) |  |  | `[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

Implements CoinOtherFactorization.

virtual int CoinOslFactorization::updateColumnFT | ( | CoinIndexedVector * | regionSparse,
|  | CoinIndexedVector * | regionSparse2,
|  | bool | noPermute = `false` |
| ) |  |  | `[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

Implements CoinOtherFactorization.

virtual int CoinOslFactorization::updateColumn | ( | CoinIndexedVector * | regionSparse,
|  | CoinIndexedVector * | regionSparse2,
|  | bool | noPermute = `false` |
| ) |  |  | const`[virtual]`

This version has same effect as above with FTUpdate==false so number returned is always >=0.

Implements CoinOtherFactorization.

virtual int CoinOslFactorization::updateTwoColumnsFT | ( | CoinIndexedVector * | regionSparse1,
|  | CoinIndexedVector * | regionSparse2,
|  | CoinIndexedVector * | regionSparse3,
|  | bool | noPermute = `false` |
| ) |  |  | `[virtual]`

does FTRAN on two columns

Implements CoinOtherFactorization.

virtual int CoinOslFactorization::updateColumnTranspose | ( | CoinIndexedVector * | regionSparse,
|  | CoinIndexedVector * | regionSparse2 |
| ) |  |  | const`[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.

Implements CoinOtherFactorization.

virtual int* CoinOslFactorization::indices | ( |  | ) | const`[virtual]`

Get rid of all memory.

Returns array to put basis indices in

Implements CoinOtherFactorization.

virtual int* CoinOslFactorization::permute | ( |  | ) | const`[inline, virtual]`

Returns permute in.

Implements CoinOtherFactorization.

Definition at line 255 of file CoinOslFactorization.hpp.

void CoinOslFactorization::gutsOfDestructor | ( | bool | clearFact = `true` | ) |

The real work of desstructor.

void CoinOslFactorization::gutsOfInitialize | ( | bool | zapFact = `true` | ) |

The real work of constructor.

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

The real work of copy.

int CoinOslFactorization::checkPivot | ( | double | saveFromU,
|  | double | oldPivot |
| ) |  |  | const`[protected]`

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

## Friends And Related Function Documentation

void CoinOslFactorizationUnitTest | ( | const std::string & | mpsDir | ) | `[friend]`

## Member Data Documentation

EKKfactinfo CoinOslFactorization::factInfo_`[protected]`

Osl factorization data.

Definition at line 277 of file CoinOslFactorization.hpp.

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

- /home/coin/svn-release/CoinUtils-2.9.4/CoinUtils/src/CoinOslFactorization.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines