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

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

# 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]
List of all members.

## Other
Clone
virtual ClpCholeskyBase * | clone () const
int | type () const
| Returns type.
void | setType (int type)
| Sets type.
## Public Member Functions
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 double *diagonal, int *rowsDropped)
| Factorize - filling in rowsDropped and returning number dropped.
virtual void | solve (double *region)
| Uses factorization to solve.
virtual void | solveKKT (double *region1, double *region2, const double *diagonal, double diagonalScaleFactor)
| Uses factorization to solve.
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.
CoinBigIndex | 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 CoinBigIndex *Astart, const int *Arow)
| Symbolic1 - works out size without clever stuff.
void | symbolic2 (const CoinBigIndex *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 (double *region, int type)
| solve - 1 just first half, 2 just second half - 3 both.
void | solveLong (longDouble *region, int type)
| Symbolic1 - works out size without clever stuff.
int | preOrder (bool lowerTriangular, bool includeDiagonal, bool doKKT)
| Forms ADAT - returns nonzero if not enough memory.
void | updateDense (longDouble *d, longDouble *work, 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.
CoinBigIndex * | choleskyStart_
| choleskyStart - element starts
int * | choleskyRow_
| choleskyRow (can be shorter than sparsefactor)
CoinBigIndex * | indexStart_
| Index starts.
longDouble * | diagonal_
| Diagonal.
longDouble * | workDouble_
| double work array
int * | link_
| link array
CoinBigIndex * | workInteger_
| type (may be useful) if > 20 do KKT
int * | clique_
| type (may be useful) if > 20 do KKT
CoinBigIndex | sizeFactor_
| sizeFactor.
CoinBigIndex | 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).

## 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 29 of file ClpCholeskyBase.hpp.

## Constructor & Destructor Documentation

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

Constructor which has dense columns activated.

Default is off.

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

Destructor (has to be public).

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

Copy.

## Member Function Documentation

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, ClpCholeskyTaucs, ClpCholeskyUfl, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

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, ClpCholeskyTaucs, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

virtual int ClpCholeskyBase::factorize | ( | const double * | diagonal,
|  | int * | rowsDropped |
| ) |  |  | `[virtual]`

Factorize - filling in rowsDropped and returning number dropped.

If return code negative then out of memory

Reimplemented in ClpCholeskyDense, ClpCholeskyTaucs, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

virtual void ClpCholeskyBase::solve | ( | double * | region | ) | `[virtual]`

Uses factorization to solve.

Reimplemented in ClpCholeskyDense, ClpCholeskyTaucs, ClpCholeskyWssmp, and ClpCholeskyWssmpKKT.

virtual void ClpCholeskyBase::solveKKT | ( | double * | region1,
|  | double * | region2,
|  | const double * | diagonal,
|  | double | diagonalScaleFactor |
| ) |  |  | `[virtual]`

Uses factorization to solve.

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

Reimplemented in ClpCholeskyWssmpKKT.

int ClpCholeskyBase::status | ( |  | ) | const`[inline]`

status. Returns status

Definition at line 60 of file ClpCholeskyBase.hpp.

References status_.

int ClpCholeskyBase::numberRowsDropped | ( |  | ) | const`[inline]`

numberRowsDropped. Number of rows gone

Definition at line 63 of file ClpCholeskyBase.hpp.

References numberRowsDropped_.

void ClpCholeskyBase::resetRowsDropped | ( |  | ) |

reset numberRowsDropped and rowsDropped.

char* ClpCholeskyBase::rowsDropped | ( |  | ) | const`[inline]`

rowsDropped - which rows are gone

Definition at line 68 of file ClpCholeskyBase.hpp.

References rowsDropped_.

double ClpCholeskyBase::choleskyCondition | ( |  | ) | const`[inline]`

choleskyCondition.

Definition at line 71 of file ClpCholeskyBase.hpp.

References choleskyCondition_.

double ClpCholeskyBase::goDense | ( |  | ) | const`[inline]`

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

Definition at line 74 of file ClpCholeskyBase.hpp.

References goDense_.

void ClpCholeskyBase::setGoDense | ( | double | value | ) | `[inline]`

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

Definition at line 77 of file ClpCholeskyBase.hpp.

References goDense_.

int ClpCholeskyBase::rank | ( |  | ) | const`[inline]`

rank. Returns rank

Definition at line 80 of file ClpCholeskyBase.hpp.

References numberRows_, and numberRowsDropped_.

int ClpCholeskyBase::numberRows | ( |  | ) | const`[inline]`

Return number of rows.

Definition at line 83 of file ClpCholeskyBase.hpp.

References numberRows_.

CoinBigIndex ClpCholeskyBase::size | ( |  | ) | const`[inline]`

Return size.

Definition at line 86 of file ClpCholeskyBase.hpp.

References sizeFactor_.

longDouble* ClpCholeskyBase::sparseFactor | ( |  | ) | const`[inline]`

Return sparseFactor.

Definition at line 89 of file ClpCholeskyBase.hpp.

References sparseFactor_.

longDouble* ClpCholeskyBase::diagonal | ( |  | ) | const`[inline]`

Return diagonal.

Reimplemented in ClpCholeskyDense.

Definition at line 92 of file ClpCholeskyBase.hpp.

References diagonal_.

longDouble* ClpCholeskyBase::workDouble | ( |  | ) | const`[inline]`

Return workDouble.

Definition at line 95 of file ClpCholeskyBase.hpp.

References workDouble_.

bool ClpCholeskyBase::kkt | ( |  | ) | const`[inline]`

If KKT on.

Definition at line 98 of file ClpCholeskyBase.hpp.

References doKKT_.

void ClpCholeskyBase::setKKT | ( | bool | yesNo | ) | `[inline]`

Set KKT.

Definition at line 101 of file ClpCholeskyBase.hpp.

References doKKT_.

void ClpCholeskyBase::setIntegerParameter | ( | int | i,
|  | int | value |
| ) |  |  | `[inline]`

Set integer parameter.

Definition at line 104 of file ClpCholeskyBase.hpp.

References integerParameters_.

int ClpCholeskyBase::getIntegerParameter | ( | int | i | ) | `[inline]`

get integer parameter

Definition at line 107 of file ClpCholeskyBase.hpp.

References integerParameters_.

void ClpCholeskyBase::setDoubleParameter | ( | int | i,
|  | double | value |
| ) |  |  | `[inline]`

Set double parameter.

Definition at line 110 of file ClpCholeskyBase.hpp.

References doubleParameters_.

double ClpCholeskyBase::getDoubleParameter | ( | int | i | ) | `[inline]`

get double parameter

Definition at line 113 of file ClpCholeskyBase.hpp.

References doubleParameters_.

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

Assignment.

virtual ClpCholeskyBase* ClpCholeskyBase::clone | ( |  | ) | const`[virtual]`

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

int ClpCholeskyBase::type | ( |  | ) | const`[inline]`

Returns type.

Definition at line 139 of file ClpCholeskyBase.hpp.

References doKKT_, and type_.

void ClpCholeskyBase::setType | ( | int | type | ) | `[inline, protected]`

Sets type.

Definition at line 143 of file ClpCholeskyBase.hpp.

References type_.

int ClpCholeskyBase::symbolic1 | ( | const CoinBigIndex * | Astart,
|  | const int * | Arow |
| ) |  |  | `[protected]`

Symbolic1 - works out size without clever stuff.

Uses upper triangular as much easier. Returns size

void ClpCholeskyBase::symbolic2 | ( | const CoinBigIndex * | Astart,
|  | const int * | Arow |
| ) |  |  | `[protected]`

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

void ClpCholeskyBase::factorizePart2 | ( | int * | rowsDropped | ) | `[protected]`

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

Reimplemented in ClpCholeskyDense.

void ClpCholeskyBase::solve | ( | double * | 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

void ClpCholeskyBase::solveLong | ( | longDouble * | region,
|  | int | type |
| ) |  |  | `[protected]`

Symbolic1 - works out size without clever stuff.

Uses upper triangular as much easier. Returns size

int ClpCholeskyBase::preOrder | ( | bool | lowerTriangular,
|  | bool | includeDiagonal,
|  | bool | doKKT |
| ) |  |  | `[protected]`

Forms ADAT - returns nonzero if not enough memory.

void ClpCholeskyBase::updateDense | ( | longDouble * | d,
|  | longDouble * | work,
|  | int * | first |
| ) |  |  | `[protected]`

Updates dense part (broken out for profiling).

## Member Data Documentation

int ClpCholeskyBase::type_`[protected]`

type (may be useful) if > 20 do KKT

Definition at line 177 of file ClpCholeskyBase.hpp.

Referenced by setType(), and type().

bool ClpCholeskyBase::doKKT_`[protected]`

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

Definition at line 179 of file ClpCholeskyBase.hpp.

Referenced by kkt(), setKKT(), and type().

double ClpCholeskyBase::goDense_`[protected]`

Go dense at this fraction.

Definition at line 181 of file ClpCholeskyBase.hpp.

Referenced by goDense(), and setGoDense().

double ClpCholeskyBase::choleskyCondition_`[protected]`

choleskyCondition.

Definition at line 183 of file ClpCholeskyBase.hpp.

Referenced by choleskyCondition().

ClpInterior* ClpCholeskyBase::model_`[protected]`

model.

Definition at line 185 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberTrials_`[protected]`

numberTrials. Number of trials before rejection

Definition at line 187 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRows_`[protected]`

numberRows. Number of Rows in factorization

Definition at line 189 of file ClpCholeskyBase.hpp.

Referenced by numberRows(), and rank().

int ClpCholeskyBase::status_`[protected]`

status. Status of factorization

Definition at line 191 of file ClpCholeskyBase.hpp.

Referenced by status().

char* ClpCholeskyBase::rowsDropped_`[protected]`

rowsDropped

Definition at line 193 of file ClpCholeskyBase.hpp.

Referenced by rowsDropped().

int* ClpCholeskyBase::permuteInverse_`[protected]`

permute inverse.

Definition at line 195 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::permute_`[protected]`

main permute.

Definition at line 197 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRowsDropped_`[protected]`

numberRowsDropped. Number of rows gone

Definition at line 199 of file ClpCholeskyBase.hpp.

Referenced by numberRowsDropped(), and rank().

longDouble* ClpCholeskyBase::sparseFactor_`[protected]`

sparseFactor.

Definition at line 201 of file ClpCholeskyBase.hpp.

Referenced by ClpCholeskyDense::aMatrix(), and sparseFactor().

CoinBigIndex* ClpCholeskyBase::choleskyStart_`[protected]`

choleskyStart - element starts

Definition at line 203 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::choleskyRow_`[protected]`

choleskyRow (can be shorter than sparsefactor)

Definition at line 205 of file ClpCholeskyBase.hpp.

CoinBigIndex* ClpCholeskyBase::indexStart_`[protected]`

Index starts.

Definition at line 207 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::diagonal_`[protected]`

Diagonal.

Definition at line 209 of file ClpCholeskyBase.hpp.

Referenced by ClpCholeskyDense::diagonal(), and diagonal().

longDouble* ClpCholeskyBase::workDouble_`[protected]`

double work array

Definition at line 211 of file ClpCholeskyBase.hpp.

Referenced by workDouble().

int* ClpCholeskyBase::link_`[protected]`

link array

Definition at line 213 of file ClpCholeskyBase.hpp.

CoinBigIndex* ClpCholeskyBase::workInteger_`[protected]`

type (may be useful) if > 20 do KKT

Definition at line 215 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::clique_`[protected]`

type (may be useful) if > 20 do KKT

Definition at line 217 of file ClpCholeskyBase.hpp.

CoinBigIndex ClpCholeskyBase::sizeFactor_`[protected]`

sizeFactor.

Definition at line 219 of file ClpCholeskyBase.hpp.

Referenced by size().

CoinBigIndex ClpCholeskyBase::sizeIndex_`[protected]`

Size of index array.

Definition at line 221 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::firstDense_`[protected]`

First dense row.

Definition at line 223 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::integerParameters_[64]`[protected]`

integerParameters

Definition at line 225 of file ClpCholeskyBase.hpp.

Referenced by getIntegerParameter(), and setIntegerParameter().

double ClpCholeskyBase::doubleParameters_[64]`[protected]`

doubleParameters;

Definition at line 227 of file ClpCholeskyBase.hpp.

Referenced by getDoubleParameter(), and setDoubleParameter().

ClpMatrixBase* ClpCholeskyBase::rowCopy_`[protected]`

Row copy of matrix.

Definition at line 229 of file ClpCholeskyBase.hpp.

char* ClpCholeskyBase::whichDense_`[protected]`

Dense indicators.

Definition at line 231 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::denseColumn_`[protected]`

Dense columns (updated).

Definition at line 233 of file ClpCholeskyBase.hpp.

ClpCholeskyDense* ClpCholeskyBase::dense_`[protected]`

Dense cholesky.

Definition at line 235 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::denseThreshold_`[protected]`

Dense threshold (for taking out of Cholesky).

Definition at line 237 of file ClpCholeskyBase.hpp.

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

- /home/coin/SVN-release/Osi-0.98.1/Clp/src/ClpCholeskyBase.hpp