- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# CoinDenseFactorization Class Reference

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

`#include <CoinDenseFactorization.hpp>`

Inheritance diagram for CoinDenseFactorization:

[legend]
Collaboration diagram for CoinDenseFactorization:

[legend]
List of all members.

## Public Member Functions
void | gutsOfDestructor ()
| The real work of desstructor.
void | gutsOfInitialize ()
| The real work of constructor.
void | gutsOfCopy (const CoinDenseFactorization &other)
| The real work of copy.
Constructors and destructor and copy
| CoinDenseFactorization ()
| Default constructor.
| CoinDenseFactorization (const CoinDenseFactorization &other)
| Copy constructor.
virtual | ~CoinDenseFactorization ()
| Destructor.
CoinDenseFactorization & | operator= (const CoinDenseFactorization &other)
| = copy
virtual CoinSmallFactorization * | 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.
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 checkBeforeModifying=false)
| 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
which user may not want to know about (left over from my LP code)
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.
## Friends
void | CoinDenseFactorizationUnitTest (const std::string &mpsDir)

## 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 262 of file CoinDenseFactorization.hpp.

## Constructor & Destructor Documentation

CoinDenseFactorization::CoinDenseFactorization | ( |  | ) |

Default constructor.

CoinDenseFactorization::CoinDenseFactorization | ( | const CoinDenseFactorization & | other | ) |

Copy constructor.

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

Destructor.

## Member Function Documentation

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

= copy

virtual CoinSmallFactorization* CoinDenseFactorization::clone | ( |  | ) | const`[virtual]`

Clone.

Implements CoinSmallFactorization.

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

Gets space for a factorization.

Implements CoinSmallFactorization.

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

PreProcesses column ordered copy of basis.

Implements CoinSmallFactorization.

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

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

Implements CoinSmallFactorization.

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

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

Implements CoinSmallFactorization.

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

Makes a non-singular basis by replacing variables.

Implements CoinSmallFactorization.

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

Total number of elements in factorization.

Implements CoinSmallFactorization.

Definition at line 307 of file CoinDenseFactorization.hpp.

References CoinSmallFactorization::numberColumns_, CoinSmallFactorization::numberPivots_, and CoinSmallFactorization::numberRows_.

double CoinDenseFactorization::maximumCoefficient | ( |  | ) | const

Returns maximum absolute value in factorization.

virtual int CoinDenseFactorization::replaceColumn | ( | CoinIndexedVector * | regionSparse,
|  | int | pivotRow,
|  | double | pivotCheck,
|  | bool | checkBeforeModifying = `false` |
| ) |  |  | `[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 CoinSmallFactorization.

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

Definition at line 339 of file CoinDenseFactorization.hpp.

References updateColumn().

virtual int CoinDenseFactorization::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 CoinSmallFactorization.

Referenced by updateColumnFT().

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

does FTRAN on two columns

Implements CoinSmallFactorization.

virtual int CoinDenseFactorization::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 CoinSmallFactorization.

void CoinDenseFactorization::clearArrays | ( |  | ) | `[inline]`

Get rid of all memory.

Definition at line 366 of file CoinDenseFactorization.hpp.

References gutsOfDestructor().

virtual int* CoinDenseFactorization::indices | ( |  | ) | const`[inline, virtual]`

Returns array to put basis indices in.

Implements CoinSmallFactorization.

Definition at line 369 of file CoinDenseFactorization.hpp.

References CoinSmallFactorization::elements_, and CoinSmallFactorization::numberRows_.

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

Returns permute in.

Implements CoinSmallFactorization.

Definition at line 372 of file CoinDenseFactorization.hpp.

void CoinDenseFactorization::gutsOfDestructor | ( |  | ) |

The real work of desstructor.

Referenced by clearArrays().

void CoinDenseFactorization::gutsOfInitialize | ( |  | ) |

The real work of constructor.

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

The real work of copy.

int CoinDenseFactorization::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 CoinDenseFactorizationUnitTest | ( | const std::string & | mpsDir | ) | `[friend]`

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

- /home/coin/SVN-release/DyLP-1.5.0/CoinUtils/src/CoinDenseFactorization.hpp