Loading...
Searching...
No Matches
ClpCholeskyBase Class Reference

Base class for Clp Cholesky factorization Will do better factorization. More...

`#include <ClpCholeskyBase.hpp>`

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

## Public Member Functions

Gets
int | status () const
| status. Returns status
int | numberRowsDropped () const
| numberRowsDropped. Number of rows gone
void | resetRowsDropped ()
| reset numberRowsDropped and rowsDropped.
char * | rowsDropped () const
| rowsDropped - which rows are gone
double | choleskyCondition () const
| choleskyCondition.
double | goDense () const
| goDense i.e. use dense factoriaztion if > this (default 0.7).
void | setGoDense (double value)
| goDense i.e. use dense factoriaztion if > this (default 0.7).
int | rank () const
| rank. Returns rank
int | numberRows () const
| Return number of rows.
int | size () const
| Return size.
longDouble * | sparseFactor () const
| Return sparseFactor.
longDouble * | diagonal () const
| Return diagonal.
longDouble * | workDouble () const
| Return workDouble.
bool | kkt () const
| If KKT on.
void | setKKT (bool yesNo)
| Set KKT.
void | setIntegerParameter (int i, int value)
| Set integer parameter.
int | getIntegerParameter (int i)
| get integer parameter
void | setDoubleParameter (int i, double value)
| Set double parameter.
double | getDoubleParameter (int i)
| get double parameter
Constructors, destructor
| ClpCholeskyBase (int denseThreshold=-1)
| Constructor which has dense columns activated.
virtual | ~ClpCholeskyBase ()
| Destructor (has to be public).
| ClpCholeskyBase (const ClpCholeskyBase &)
| Copy.
ClpCholeskyBase & | operator= (const ClpCholeskyBase &)
| Assignment.

## Protected Member Functions

Symbolic, factor and solve
int | symbolic1 (const int *Astart, const int *Arow)
| Symbolic1 - works out size without clever stuff.
void | symbolic2 (const int *Astart, const int *Arow)
| Symbolic2 - Fills in indices Uses lower triangular so can do cliques etc.
void | factorizePart2 (int *rowsDropped)
| Factorize - filling in rowsDropped and returning number dropped in integerParam.
void | solve (CoinWorkDouble *region, int type)
| solve - 1 just first half, 2 just second half - 3 both.
int | preOrder (bool lowerTriangular, bool includeDiagonal, bool doKKT)
| Forms ADAT - returns nonzero if not enough memory.
void | updateDense (longDouble *d, int *first)
| Updates dense part (broken out for profiling).

## Protected Attributes

Data members
The data members are protected to allow access for derived classes.
int | type_
| type (may be useful) if > 20 do KKT
bool | doKKT_
| Doing full KKT (only used if default symbolic and factorization).
double | goDense_
| Go dense at this fraction.
double | choleskyCondition_
| choleskyCondition.
ClpInterior * | model_
| model.
int | numberTrials_
| numberTrials. Number of trials before rejection
int | numberRows_
| numberRows. Number of Rows in factorization
int | status_
| status. Status of factorization
char * | rowsDropped_
| rowsDropped
int * | permuteInverse_
| permute inverse.
int * | permute_
| main permute.
int | numberRowsDropped_
| numberRowsDropped. Number of rows gone
longDouble * | sparseFactor_
| sparseFactor.
int * | choleskyStart_
| choleskyStart - element starts
int * | choleskyRow_
| choleskyRow (can be shorter than sparsefactor)
int * | indexStart_
| Index starts.
longDouble * | diagonal_
| Diagonal.
longDouble * | workDouble_
| double work array
int * | link_
| link array
int * | workInteger_
int * | clique_
int | sizeFactor_
| sizeFactor.
int | sizeIndex_
| Size of index array.
int | firstDense_
| First dense row.
int | integerParameters_ [64]
| integerParameters
double | doubleParameters_ [64]
| doubleParameters;
ClpMatrixBase * | rowCopy_
| Row copy of matrix.
char * | whichDense_
| Dense indicators.
longDouble * | denseColumn_
| Dense columns (updated).
ClpCholeskyDense * | dense_
| Dense cholesky.
int | denseThreshold_
| Dense threshold (for taking out of Cholesky).

## Virtual methods that the derived classes may provide

virtual int | order (ClpInterior *model)
| Orders rows and saves pointer to matrix.and model.
virtual int | symbolic ()
| Does Symbolic factorization given permutation.
virtual int | factorize (const CoinWorkDouble *diagonal, int *rowsDropped)
| Factorize - filling in rowsDropped and returning number dropped.
virtual void | solve (CoinWorkDouble *region)
| Uses factorization to solve.
virtual void | solveKKT (CoinWorkDouble *region1, CoinWorkDouble *region2, const CoinWorkDouble *diagonal, CoinWorkDouble diagonalScaleFactor)
| Uses factorization to solve.
int | orderAMD ()
| AMD ordering.

## Other

Clone
virtual ClpCholeskyBase * | clone () const
int | type () const
| Returns type.
void | setType (int type)
| Sets type.
void | setModel (ClpInterior *model)
| model.

## Detailed Description

Base class for Clp Cholesky factorization Will do better factorization.

very crude ordering

Derived classes may be using more sophisticated methods

Definition at line 53 of file ClpCholeskyBase.hpp.

## Constructor & Destructor Documentation

## ClpCholeskyBase() [1/2]

ClpCholeskyBase::ClpCholeskyBase | ( | int | denseThreshold = -1 | ) |

Constructor which has dense columns activated.

Default is off.

## ~ClpCholeskyBase()

virtual ClpCholeskyBase::~ClpCholeskyBase | ( |  | ) |

virtual

Destructor (has to be public).

## ClpCholeskyBase() [2/2]

ClpCholeskyBase::ClpCholeskyBase | ( | const ClpCholeskyBase & |  | ) |

Copy.

## Member Function Documentation

## order()

virtual int ClpCholeskyBase::order | ( | ClpInterior * | model | ) |

virtual

Orders rows and saves pointer to matrix.and model.

returns non-zero if not enough memory. You can use preOrder to set up ADAT If using default symbolic etc then must set sizeFactor_ to size of input matrix to order (and to symbolic). Also just permute_ and permuteInverse_ should be created

Reimplemented in ClpCholeskyDense, ClpCholeskyMumps, ClpCholeskyTaucs, ClpCholeskyUfl, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

## symbolic()

virtual int ClpCholeskyBase::symbolic | ( |  | ) |

virtual

Does Symbolic factorization given permutation.

This is called immediately after order. If user provides this then user must provide factorize and solve. Otherwise the default factorization is used returns non-zero if not enough memory

Reimplemented in ClpCholeskyDense, ClpCholeskyMumps, ClpCholeskyTaucs, ClpCholeskyUfl, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

## factorize()

virtual int ClpCholeskyBase::factorize | ( | const CoinWorkDouble * | diagonal,
|  | int * | rowsDropped )

virtual

Factorize - filling in rowsDropped and returning number dropped.

If return code negative then out of memory

Reimplemented in ClpCholeskyDense.

## solve() [1/2]

virtual void ClpCholeskyBase::solve | ( | CoinWorkDouble * | region | ) |

virtual

Uses factorization to solve.

Reimplemented in ClpCholeskyDense.

## solveKKT()

virtual void ClpCholeskyBase::solveKKT | ( | CoinWorkDouble * | region1,
|  | CoinWorkDouble * | region2,
|  | const CoinWorkDouble * | diagonal,
|  | CoinWorkDouble | diagonalScaleFactor )

virtual

Uses factorization to solve.

- given as if KKT. region1 is rows+columns, region2 is rows

## orderAMD()

int ClpCholeskyBase::orderAMD | ( |  | ) |

private

AMD ordering.

## status()

int ClpCholeskyBase::status | ( |  | ) | const

inline

status. Returns status

Definition at line 90 of file ClpCholeskyBase.hpp.

## numberRowsDropped()

int ClpCholeskyBase::numberRowsDropped | ( |  | ) | const

inline

numberRowsDropped. Number of rows gone

Definition at line 95 of file ClpCholeskyBase.hpp.

## resetRowsDropped()

void ClpCholeskyBase::resetRowsDropped | ( |  | ) |

reset numberRowsDropped and rowsDropped.

## rowsDropped()

char * ClpCholeskyBase::rowsDropped | ( |  | ) | const

inline

rowsDropped - which rows are gone

Definition at line 102 of file ClpCholeskyBase.hpp.

## choleskyCondition()

double ClpCholeskyBase::choleskyCondition | ( |  | ) | const

inline

choleskyCondition.

Definition at line 107 of file ClpCholeskyBase.hpp.

## goDense()

double ClpCholeskyBase::goDense | ( |  | ) | const

inline

goDense i.e. use dense factoriaztion if > this (default 0.7).

Definition at line 112 of file ClpCholeskyBase.hpp.

## setGoDense()

void ClpCholeskyBase::setGoDense | ( | double | value | ) |

inline

goDense i.e. use dense factoriaztion if > this (default 0.7).

Definition at line 117 of file ClpCholeskyBase.hpp.

## rank()

int ClpCholeskyBase::rank | ( |  | ) | const

inline

rank. Returns rank

Definition at line 122 of file ClpCholeskyBase.hpp.

## numberRows()

int ClpCholeskyBase::numberRows | ( |  | ) | const

inline

Return number of rows.

Definition at line 127 of file ClpCholeskyBase.hpp.

## size()

int ClpCholeskyBase::size | ( |  | ) | const

inline

Return size.

Definition at line 132 of file ClpCholeskyBase.hpp.

## sparseFactor()

longDouble * ClpCholeskyBase::sparseFactor | ( |  | ) | const

inline

Return sparseFactor.

Definition at line 137 of file ClpCholeskyBase.hpp.

## diagonal()

longDouble * ClpCholeskyBase::diagonal | ( |  | ) | const

inline

Return diagonal.

Definition at line 142 of file ClpCholeskyBase.hpp.

## workDouble()

longDouble * ClpCholeskyBase::workDouble | ( |  | ) | const

inline

Return workDouble.

Definition at line 147 of file ClpCholeskyBase.hpp.

## kkt()

bool ClpCholeskyBase::kkt | ( |  | ) | const

inline

If KKT on.

Definition at line 152 of file ClpCholeskyBase.hpp.

## setKKT()

void ClpCholeskyBase::setKKT | ( | bool | yesNo | ) |

inline

Set KKT.

Definition at line 157 of file ClpCholeskyBase.hpp.

## setIntegerParameter()

void ClpCholeskyBase::setIntegerParameter | ( | int | i,
|  | int | value )

inline

Set integer parameter.

Definition at line 162 of file ClpCholeskyBase.hpp.

## getIntegerParameter()

int ClpCholeskyBase::getIntegerParameter | ( | int | i | ) |

inline

get integer parameter

Definition at line 167 of file ClpCholeskyBase.hpp.

## setDoubleParameter()

void ClpCholeskyBase::setDoubleParameter | ( | int | i,
|  | double | value )

inline

Set double parameter.

Definition at line 172 of file ClpCholeskyBase.hpp.

## getDoubleParameter()

double ClpCholeskyBase::getDoubleParameter | ( | int | i | ) |

inline

get double parameter

Definition at line 177 of file ClpCholeskyBase.hpp.

## operator=()

ClpCholeskyBase & ClpCholeskyBase::operator= | ( | const ClpCholeskyBase & |  | ) |

Assignment.

## clone()

virtual ClpCholeskyBase * ClpCholeskyBase::clone | ( |  | ) | const

virtual

Reimplemented in ClpCholeskyDense, ClpCholeskyMumps, ClpCholeskyTaucs, ClpCholeskyUfl, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

## type()

int ClpCholeskyBase::type | ( |  | ) | const

inline

Returns type.

Definition at line 203 of file ClpCholeskyBase.hpp.

## setType()

void ClpCholeskyBase::setType | ( | int | type | ) |

inline protected

Sets type.

Definition at line 213 of file ClpCholeskyBase.hpp.

## setModel()

void ClpCholeskyBase::setModel | ( | ClpInterior * | model | ) |

inline protected

model.

Definition at line 218 of file ClpCholeskyBase.hpp.

## symbolic1()

int ClpCholeskyBase::symbolic1 | ( | const int * | Astart,
|  | const int * | Arow )

protected

Symbolic1 - works out size without clever stuff.

Uses upper triangular as much easier. Returns size

## symbolic2()

void ClpCholeskyBase::symbolic2 | ( | const int * | Astart,
|  | const int * | Arow )

protected

Symbolic2 - Fills in indices Uses lower triangular so can do cliques etc.

## factorizePart2()

void ClpCholeskyBase::factorizePart2 | ( | int * | rowsDropped | ) |

protected

Factorize - filling in rowsDropped and returning number dropped in integerParam.

## solve() [2/2]

void ClpCholeskyBase::solve | ( | CoinWorkDouble * | region,
|  | int | type )

protected

solve - 1 just first half, 2 just second half - 3 both.

If 1 and 2 then diagonal has sqrt of inverse otherwise inverse

## preOrder()

int ClpCholeskyBase::preOrder | ( | bool | lowerTriangular,
|  | bool | includeDiagonal,
|  | bool | doKKT )

protected

Forms ADAT - returns nonzero if not enough memory.

## updateDense()

void ClpCholeskyBase::updateDense | ( | longDouble * | d,
|  | int * | first )

protected

Updates dense part (broken out for profiling).

## Member Data Documentation

## type_

int ClpCholeskyBase::type_

protected

type (may be useful) if > 20 do KKT

Definition at line 254 of file ClpCholeskyBase.hpp.

## doKKT_

bool ClpCholeskyBase::doKKT_

protected

Doing full KKT (only used if default symbolic and factorization).

Definition at line 256 of file ClpCholeskyBase.hpp.

## goDense_

double ClpCholeskyBase::goDense_

protected

Go dense at this fraction.

Definition at line 258 of file ClpCholeskyBase.hpp.

## choleskyCondition_

double ClpCholeskyBase::choleskyCondition_

protected

choleskyCondition.

Definition at line 260 of file ClpCholeskyBase.hpp.

## model_

ClpInterior* ClpCholeskyBase::model_

protected

model.

Definition at line 262 of file ClpCholeskyBase.hpp.

## numberTrials_

int ClpCholeskyBase::numberTrials_

protected

numberTrials. Number of trials before rejection

Definition at line 264 of file ClpCholeskyBase.hpp.

## numberRows_

int ClpCholeskyBase::numberRows_

protected

numberRows. Number of Rows in factorization

Definition at line 266 of file ClpCholeskyBase.hpp.

## status_

int ClpCholeskyBase::status_

protected

status. Status of factorization

Definition at line 268 of file ClpCholeskyBase.hpp.

## rowsDropped_

char* ClpCholeskyBase::rowsDropped_

protected

rowsDropped

Definition at line 270 of file ClpCholeskyBase.hpp.

## permuteInverse_

int* ClpCholeskyBase::permuteInverse_

protected

permute inverse.

Definition at line 272 of file ClpCholeskyBase.hpp.

## permute_

int* ClpCholeskyBase::permute_

protected

main permute.

Definition at line 274 of file ClpCholeskyBase.hpp.

## numberRowsDropped_

int ClpCholeskyBase::numberRowsDropped_

protected

numberRowsDropped. Number of rows gone

Definition at line 276 of file ClpCholeskyBase.hpp.

## sparseFactor_

longDouble* ClpCholeskyBase::sparseFactor_

protected

sparseFactor.

Definition at line 278 of file ClpCholeskyBase.hpp.

## choleskyStart_

int* ClpCholeskyBase::choleskyStart_

protected

choleskyStart - element starts

Definition at line 280 of file ClpCholeskyBase.hpp.

## choleskyRow_

int* ClpCholeskyBase::choleskyRow_

protected

choleskyRow (can be shorter than sparsefactor)

Definition at line 282 of file ClpCholeskyBase.hpp.

## indexStart_

int* ClpCholeskyBase::indexStart_

protected

Index starts.

Definition at line 284 of file ClpCholeskyBase.hpp.

## diagonal_

longDouble* ClpCholeskyBase::diagonal_

protected

Diagonal.

Definition at line 286 of file ClpCholeskyBase.hpp.

## workDouble_

longDouble* ClpCholeskyBase::workDouble_

protected

double work array

Definition at line 288 of file ClpCholeskyBase.hpp.

## link_

int* ClpCholeskyBase::link_

protected

link array

Definition at line 290 of file ClpCholeskyBase.hpp.

## workInteger_

int* ClpCholeskyBase::workInteger_

protected

Definition at line 292 of file ClpCholeskyBase.hpp.

## clique_

int* ClpCholeskyBase::clique_

protected

Definition at line 294 of file ClpCholeskyBase.hpp.

## sizeFactor_

int ClpCholeskyBase::sizeFactor_

protected

sizeFactor.

Definition at line 296 of file ClpCholeskyBase.hpp.

## sizeIndex_

int ClpCholeskyBase::sizeIndex_

protected

Size of index array.

Definition at line 298 of file ClpCholeskyBase.hpp.

## firstDense_

int ClpCholeskyBase::firstDense_

protected

First dense row.

Definition at line 300 of file ClpCholeskyBase.hpp.

## integerParameters_

int ClpCholeskyBase::integerParameters_[64]

protected

integerParameters

Definition at line 302 of file ClpCholeskyBase.hpp.

## doubleParameters_

double ClpCholeskyBase::doubleParameters_[64]

protected

doubleParameters;

Definition at line 304 of file ClpCholeskyBase.hpp.

## rowCopy_

ClpMatrixBase* ClpCholeskyBase::rowCopy_

protected

Row copy of matrix.

Definition at line 306 of file ClpCholeskyBase.hpp.

## whichDense_

char* ClpCholeskyBase::whichDense_

protected

Dense indicators.

Definition at line 308 of file ClpCholeskyBase.hpp.

## denseColumn_

longDouble* ClpCholeskyBase::denseColumn_

protected

Dense columns (updated).

Definition at line 310 of file ClpCholeskyBase.hpp.

## dense_

ClpCholeskyDense* ClpCholeskyBase::dense_

protected

Dense cholesky.

Definition at line 312 of file ClpCholeskyBase.hpp.

## denseThreshold_

int ClpCholeskyBase::denseThreshold_

protected

Dense threshold (for taking out of Cholesky).

Definition at line 314 of file ClpCholeskyBase.hpp.

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

- Clp/src/ClpCholeskyBase.hpp