Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
ClpCholeskyBase Class Reference

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

#include <ClpCholeskyBase.hpp>

+ Inheritance diagram for ClpCholeskyBase:
+ Collaboration diagram for ClpCholeskyBase:

Public Member Functions

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

Protected Member Functions

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

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 More...
 
bool doKKT_
 Doing full KKT (only used if default symbolic and factorization) More...
 
double goDense_
 Go dense at this fraction. More...
 
double choleskyCondition_
 choleskyCondition. More...
 
ClpInteriormodel_
 model. More...
 
int numberTrials_
 numberTrials. Number of trials before rejection More...
 
int numberRows_
 numberRows. Number of Rows in factorization More...
 
int status_
 status. Status of factorization More...
 
char * rowsDropped_
 rowsDropped More...
 
int * permuteInverse_
 permute inverse. More...
 
int * permute_
 main permute. More...
 
int numberRowsDropped_
 numberRowsDropped. Number of rows gone More...
 
longDoublesparseFactor_
 sparseFactor. More...
 
CoinBigIndexcholeskyStart_
 choleskyStart - element starts More...
 
int * choleskyRow_
 choleskyRow (can be shorter than sparsefactor) More...
 
CoinBigIndexindexStart_
 Index starts. More...
 
longDoublediagonal_
 Diagonal. More...
 
longDoubleworkDouble_
 double work array More...
 
int * link_
 link array More...
 
CoinBigIndexworkInteger_
 
int * clique_
 
CoinBigIndex sizeFactor_
 sizeFactor. More...
 
CoinBigIndex sizeIndex_
 Size of index array. More...
 
int firstDense_
 First dense row. More...
 
int integerParameters_ [64]
 integerParameters More...
 
double doubleParameters_ [64]
 doubleParameters; More...
 
ClpMatrixBaserowCopy_
 Row copy of matrix. More...
 
char * whichDense_
 Dense indicators. More...
 
longDoubledenseColumn_
 Dense columns (updated) More...
 
ClpCholeskyDensedense_
 Dense cholesky. More...
 
int denseThreshold_
 Dense threshold (for taking out of Cholesky) More...
 

Virtual methods that the derived classes may provide

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

Other

Clone

virtual ClpCholeskyBaseclone () const
 
int type () const
 Returns type. More...
 
void setType (int type)
 Sets type. More...
 
void setModel (ClpInterior *model)
 model. More...
 

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

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

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

virtual void ClpCholeskyBase::solve ( CoinWorkDouble region)
virtual
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

Reimplemented in ClpCholeskyWssmpKKT.

int ClpCholeskyBase::orderAMD ( )
private

AMD ordering.

int ClpCholeskyBase::status ( ) const
inline

status. Returns status

Definition at line 88 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRowsDropped ( ) const
inline

numberRowsDropped. Number of rows gone

Definition at line 92 of file ClpCholeskyBase.hpp.

void ClpCholeskyBase::resetRowsDropped ( )

reset numberRowsDropped and rowsDropped.

char* ClpCholeskyBase::rowsDropped ( ) const
inline

rowsDropped - which rows are gone

Definition at line 98 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::choleskyCondition ( ) const
inline

choleskyCondition.

Definition at line 102 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::goDense ( ) const
inline

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

Definition at line 106 of file ClpCholeskyBase.hpp.

void ClpCholeskyBase::setGoDense ( double  value)
inline

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

Definition at line 110 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::rank ( ) const
inline

rank. Returns rank

Definition at line 114 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRows ( ) const
inline

Return number of rows.

Definition at line 118 of file ClpCholeskyBase.hpp.

CoinBigIndex ClpCholeskyBase::size ( ) const
inline

Return size.

Definition at line 122 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::sparseFactor ( ) const
inline

Return sparseFactor.

Definition at line 126 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::diagonal ( ) const
inline

Return diagonal.

Definition at line 130 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::workDouble ( ) const
inline

Return workDouble.

Definition at line 134 of file ClpCholeskyBase.hpp.

bool ClpCholeskyBase::kkt ( ) const
inline

If KKT on.

Definition at line 138 of file ClpCholeskyBase.hpp.

void ClpCholeskyBase::setKKT ( bool  yesNo)
inline

Set KKT.

Definition at line 142 of file ClpCholeskyBase.hpp.

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

Set integer parameter.

Definition at line 146 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::getIntegerParameter ( int  i)
inline

get integer parameter

Definition at line 150 of file ClpCholeskyBase.hpp.

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

Set double parameter.

Definition at line 154 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::getDoubleParameter ( int  i)
inline

get double parameter

Definition at line 158 of file ClpCholeskyBase.hpp.

ClpCholeskyBase& ClpCholeskyBase::operator= ( const ClpCholeskyBase )

Assignment.

virtual ClpCholeskyBase* ClpCholeskyBase::clone ( ) const
virtual
int ClpCholeskyBase::type ( ) const
inline

Returns type.

Definition at line 185 of file ClpCholeskyBase.hpp.

void ClpCholeskyBase::setType ( int  type)
inlineprotected

Sets type.

Definition at line 191 of file ClpCholeskyBase.hpp.

void ClpCholeskyBase::setModel ( ClpInterior model)
inlineprotected

model.

Definition at line 195 of file ClpCholeskyBase.hpp.

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.

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

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

Forms ADAT - returns nonzero if not enough memory.

void ClpCholeskyBase::updateDense ( longDouble d,
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 230 of file ClpCholeskyBase.hpp.

bool ClpCholeskyBase::doKKT_
protected

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

Definition at line 232 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::goDense_
protected

Go dense at this fraction.

Definition at line 234 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::choleskyCondition_
protected

choleskyCondition.

Definition at line 236 of file ClpCholeskyBase.hpp.

ClpInterior* ClpCholeskyBase::model_
protected

model.

Definition at line 238 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberTrials_
protected

numberTrials. Number of trials before rejection

Definition at line 240 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRows_
protected

numberRows. Number of Rows in factorization

Definition at line 242 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::status_
protected

status. Status of factorization

Definition at line 244 of file ClpCholeskyBase.hpp.

char* ClpCholeskyBase::rowsDropped_
protected

rowsDropped

Definition at line 246 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::permuteInverse_
protected

permute inverse.

Definition at line 248 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::permute_
protected

main permute.

Definition at line 250 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::numberRowsDropped_
protected

numberRowsDropped. Number of rows gone

Definition at line 252 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::sparseFactor_
protected

sparseFactor.

Definition at line 254 of file ClpCholeskyBase.hpp.

CoinBigIndex* ClpCholeskyBase::choleskyStart_
protected

choleskyStart - element starts

Definition at line 256 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::choleskyRow_
protected

choleskyRow (can be shorter than sparsefactor)

Definition at line 258 of file ClpCholeskyBase.hpp.

CoinBigIndex* ClpCholeskyBase::indexStart_
protected

Index starts.

Definition at line 260 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::diagonal_
protected

Diagonal.

Definition at line 262 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::workDouble_
protected

double work array

Definition at line 264 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::link_
protected

link array

Definition at line 266 of file ClpCholeskyBase.hpp.

CoinBigIndex* ClpCholeskyBase::workInteger_
protected

Definition at line 268 of file ClpCholeskyBase.hpp.

int* ClpCholeskyBase::clique_
protected

Definition at line 270 of file ClpCholeskyBase.hpp.

CoinBigIndex ClpCholeskyBase::sizeFactor_
protected

sizeFactor.

Definition at line 272 of file ClpCholeskyBase.hpp.

CoinBigIndex ClpCholeskyBase::sizeIndex_
protected

Size of index array.

Definition at line 274 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::firstDense_
protected

First dense row.

Definition at line 276 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::integerParameters_[64]
protected

integerParameters

Definition at line 278 of file ClpCholeskyBase.hpp.

double ClpCholeskyBase::doubleParameters_[64]
protected

doubleParameters;

Definition at line 280 of file ClpCholeskyBase.hpp.

ClpMatrixBase* ClpCholeskyBase::rowCopy_
protected

Row copy of matrix.

Definition at line 282 of file ClpCholeskyBase.hpp.

char* ClpCholeskyBase::whichDense_
protected

Dense indicators.

Definition at line 284 of file ClpCholeskyBase.hpp.

longDouble* ClpCholeskyBase::denseColumn_
protected

Dense columns (updated)

Definition at line 286 of file ClpCholeskyBase.hpp.

ClpCholeskyDense* ClpCholeskyBase::dense_
protected

Dense cholesky.

Definition at line 288 of file ClpCholeskyBase.hpp.

int ClpCholeskyBase::denseThreshold_
protected

Dense threshold (for taking out of Cholesky)

Definition at line 290 of file ClpCholeskyBase.hpp.


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