CoinSimpFactorization

CoinSimpFactorization class documentation

Inheritance

Inherits from: CoinOtherFactorization

Public Methods

CoinSimpFactorization

Default constructor.

 CoinSimpFactorization()

CoinSimpFactorization

Copy constructor.

 CoinSimpFactorization(const CoinSimpFactorization & other)

Parameters:

~CoinSimpFactorization

Destructor.

 ~CoinSimpFactorization()

operator=

= copy

CoinSimpFactorization & operator=(const CoinSimpFactorization & other)

Parameters:

clone

Clone.

CoinOtherFactorization * clone()

getAreas

Gets space for a factorization.

void getAreas(int numberRows, int numberColumns, int maximumL, int maximumU)

Parameters:

preProcess

PreProcesses column ordered copy of basis.

void preProcess()

factor

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

int factor()

postProcess

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

void postProcess(const int * sequence, int * pivotVariable)

Parameters:

makeNonSingular

Makes a non-singular basis by replacing variables.

void makeNonSingular(int * sequence, int numberColumns)

Parameters:

numberElements

Total number of elements in factorization.

int numberElements()

maximumCoefficient

Returns maximum absolute value in factorization.

double maximumCoefficient()

replaceColumn

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.

int replaceColumn(CoinIndexedVector * regionSparse, int pivotRow, double pivotCheck, bool checkBeforeModifying = false, double acceptablePivot = 1.0e-8)

Parameters:

updateColumnFT

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.

int updateColumnFT(CoinIndexedVector * regionSparse, CoinIndexedVector * regionSparse2, bool noPermute = false)

Parameters:

updateColumn

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

int updateColumn(CoinIndexedVector * regionSparse, CoinIndexedVector * regionSparse2, bool noPermute = false)

Parameters:

updateTwoColumnsFT

does FTRAN on two columns

int updateTwoColumnsFT(CoinIndexedVector * regionSparse1, CoinIndexedVector * regionSparse2, CoinIndexedVector * regionSparse3, bool noPermute = false)

Parameters:

upColumn

does updatecolumn if save==true keeps column for replace column

int upColumn(CoinIndexedVector * regionSparse, CoinIndexedVector * regionSparse2, bool noPermute = false, bool save = false)

Parameters:

updateColumnTranspose

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.

int updateColumnTranspose(CoinIndexedVector * regionSparse, CoinIndexedVector * regionSparse2)

Parameters:

upColumnTranspose

does updateColumnTranspose, the other is a wrapper

int upColumnTranspose(CoinIndexedVector * regionSparse, CoinIndexedVector * regionSparse2)

Parameters:

clearArrays

Get rid of all memory.

void clearArrays()

indices

Returns array to put basis indices in.

int * indices()

permute

Returns permute in.

int * permute()

gutsOfDestructor

The real work of destructor.

void gutsOfDestructor()

gutsOfInitialize

The real work of constructor.

void gutsOfInitialize()

gutsOfCopy

The real work of copy.

void gutsOfCopy(const CoinSimpFactorization & other)

Parameters:

factorize

calls factorization

void factorize(int numberOfRows, int numberOfColumns, const int colStarts, const int indicesRow, const double elements)

Parameters:

mainLoopFactor

main loop of factorization

int mainLoopFactor(FactorPointers & pointers)

Parameters:

copyLbyRows

copies L by rows

void copyLbyRows()

copyUbyColumns

copies U by columns

void copyUbyColumns()

findPivot

finds a pivot element using Markowitz count

int findPivot(FactorPointers & pointers, int & r, int & s, bool & ifSlack)

Parameters:

findPivotShCol

finds a pivot in a shortest column

int findPivotShCol(FactorPointers & pointers, int & r, int & s)

Parameters:

findPivotSimp

finds a pivot in the first column available

int findPivotSimp(FactorPointers & pointers, int & r, int & s)

Parameters:

GaussEliminate

does Gauss elimination

void GaussEliminate(FactorPointers & pointers, int & r, int & s)

Parameters:

findShortRow

finds short row that intersects a given column

int findShortRow(const int column, const int length, int & minRow, int & minRowLength, FactorPointers & pointers)

Parameters:

findShortColumn

finds short column that intersects a given row

int findShortColumn(const int row, const int length, int & minCol, int & minColLength, FactorPointers & pointers)

Parameters:

findMaxInRrow

finds maximum absolute value in a row

double findMaxInRrow(const int row, FactorPointers & pointers)

Parameters:

pivoting

does pivoting

void pivoting(const int pivotRow, const int pivotColumn, const double invPivot, FactorPointers & pointers)

Parameters:

updateCurrentRow

part of pivoting

void updateCurrentRow(const int pivotRow, const int row, const double multiplier, FactorPointers & pointers, int & newNonZeros)

Parameters:

increaseLsize

allocates more space for L

void increaseLsize()

increaseRowSize

allocates more space for a row of U

void increaseRowSize(const int row, const int newSize)

Parameters:

increaseColSize

allocates more space for a column of U

void increaseColSize(const int column, const int newSize, const bool b)

Parameters:

enlargeUrow

allocates more space for rows of U

void enlargeUrow(const int numNewElements)

Parameters:

enlargeUcol

allocates more space for columns of U

void enlargeUcol(const int numNewElements, const bool b)

Parameters:

findInRow

finds a given row in a column

int findInRow(const int row, const int column)

Parameters:

findInColumn

finds a given column in a row

int findInColumn(const int column, const int row)

Parameters:

removeRowFromActSet

declares a row inactive

void removeRowFromActSet(const int row, FactorPointers & pointers)

Parameters:

removeColumnFromActSet

declares a column inactive

void removeColumnFromActSet(const int column, FactorPointers & pointers)

Parameters:

allocateSpaceForU

allocates space for U

void allocateSpaceForU()

allocateSomeArrays

allocates several working arrays

void allocateSomeArrays()

initialSomeNumbers

initializes some numbers

void initialSomeNumbers()

Lxeqb

solves L x = b

void Lxeqb(double * b)

Parameters:

Lxeqb2

same as above but with two rhs

void Lxeqb2(double * b1, double * b2)

Parameters:

Uxeqb

solves U x = b

void Uxeqb(double * b, double * sol)

Parameters:

Uxeqb2

same as above but with two rhs

void Uxeqb2(double * b1, double * sol1, double * sol2, double * b2)

Parameters:

xLeqb

solves x L = b

void xLeqb(double * b)

Parameters:

xUeqb

solves x U = b

void xUeqb(double * b, double * sol)

Parameters:

LUupdate

updates factorization after a Simplex iteration

int LUupdate(int newBasicCol)

Parameters:

newEta

creates a new eta vector

void newEta(int row, int numNewElements)

Parameters:

copyRowPermutations

makes a copy of row permutations

void copyRowPermutations()

Hxeqb

solves H x = b, where H is a product of eta matrices

void Hxeqb(double * b)

Parameters:

Hxeqb2

same as above but with two rhs

void Hxeqb2(double * b1, double * b2)

Parameters:

xHeqb

solves x H = b

void xHeqb(double * b)

Parameters:

ftran

does FTRAN

void ftran(double * b, double * sol, bool save)

Parameters:

ftran2

same as above but with two columns

void ftran2(double * b1, double * sol1, double * b2, double * sol2)

Parameters:

btran

does BTRAN

void btran(double * b, double * sol)

Parameters:

Source

Header: layer-0/CoinUtils/src/CoinSimpFactorization.hpp