Go to the documentation of this file.
6 #ifndef ClpCholeskyBase_H
7 #define ClpCholeskyBase_H
9 #include "CoinPragma.hpp"
10 #include "CoinTypes.hpp"
12 #ifndef CLP_LONG_CHOLESKY
13 #define CLP_LONG_CHOLESKY 0
20 #if COIN_LONG_WORK == 0
21 #if CLP_LONG_CHOLESKY > 0
22 #define CHOLESKY_BAD_COMBINATION
25 #if CLP_LONG_CHOLESKY == 0
26 #define CHOLESKY_BAD_COMBINATION
29 #ifdef CHOLESKY_BAD_COMBINATION
30 #warning("Bad combination of CLP_LONG_CHOLESKY and COIN_BIG_DOUBLE/COIN_LONG_WORK");
31 "Bad combination of CLP_LONG_CHOLESKY and COIN_LONG_WORK"
33 #if CLP_LONG_CHOLESKY > 1
35 #define CHOL_SMALL_VALUE 1.0e-15
36 #elif CLP_LONG_CHOLESKY == 1
38 #define CHOL_SMALL_VALUE 1.0e-11
41 #define CHOL_SMALL_VALUE 1.0e-11
74 virtual void solve(CoinWorkDouble *region);
77 virtual void solveKKT(CoinWorkDouble *region1, CoinWorkDouble *region2,
const CoinWorkDouble *
diagonal,
78 CoinWorkDouble diagonalScaleFactor);
230 int symbolic1(
const int *Astart,
const int *Arow);
234 void symbolic2(
const int *Astart,
const int *Arow);
242 void solve(CoinWorkDouble *region,
int type);
244 int preOrder(
bool lowerTriangular,
bool includeDiagonal,
bool doKKT);
longDouble * diagonal() const
Return diagonal.
ClpMatrixBase * rowCopy_
Row copy of matrix.
bool doKKT_
Doing full KKT (only used if default symbolic and factorization)
int numberRowsDropped() const
numberRowsDropped. Number of rows gone
void setIntegerParameter(int i, int value)
Set integer parameter.
int * choleskyRow_
choleskyRow (can be shorter than sparsefactor)
int type() const
Returns type.
ClpCholeskyBase(int denseThreshold=-1)
Constructor which has dense columns activated.
int sizeIndex_
Size of index array.
double getDoubleParameter(int i)
get double parameter
void setModel(ClpInterior *model)
model.
Base class for Clp Cholesky factorization Will do better factorization.
double doubleParameters_[64]
doubleParameters;
double choleskyCondition() const
choleskyCondition.
longDouble * denseColumn_
Dense columns (updated)
void resetRowsDropped()
reset numberRowsDropped and rowsDropped.
void setKKT(bool yesNo)
Set KKT.
int sizeFactor_
sizeFactor.
virtual void solve(CoinWorkDouble *region)
Uses factorization to solve.
void factorizePart2(int *rowsDropped)
Factorize - filling in rowsDropped and returning number dropped in integerParam.
double choleskyCondition_
choleskyCondition.
char * rowsDropped() const
rowsDropped - which rows are gone
bool kkt() const
If KKT on.
void setGoDense(double value)
goDense i.e. use dense factoriaztion if > this (default 0.7).
int numberRows_
numberRows. Number of Rows in factorization
int denseThreshold_
Dense threshold (for taking out of Cholesky)
ClpCholeskyDense * dense_
Dense cholesky.
void setDoubleParameter(int i, double value)
Set double parameter.
int getIntegerParameter(int i)
get integer parameter
Abstract base class for Clp Matrices.
virtual int symbolic()
Does Symbolic factorization given permutation.
int status() const
status. Returns status
int status_
status. Status of factorization
int numberTrials_
numberTrials. Number of trials before rejection
void symbolic2(const int *Astart, const int *Arow)
Symbolic2 - Fills in indices Uses lower triangular so can do cliques etc.
double goDense() const
goDense i.e. use dense factoriaztion if > this (default 0.7).
int firstDense_
First dense row.
int type_
type (may be useful) if > 20 do KKT
int * choleskyStart_
choleskyStart - element starts
longDouble * workDouble() const
Return workDouble.
longDouble * diagonal_
Diagonal.
This solves LPs using interior point methods.
longDouble * workDouble_
double work array
int rank() const
rank. Returns rank
double goDense_
Go dense at this fraction.
longDouble * sparseFactor_
sparseFactor.
ClpCholeskyBase & operator=(const ClpCholeskyBase &)
Assignment.
int preOrder(bool lowerTriangular, bool includeDiagonal, bool doKKT)
Forms ADAT - returns nonzero if not enough memory.
ClpInterior * model_
model.
int numberRows() const
Return number of rows.
int size() const
Return size.
int numberRowsDropped_
numberRowsDropped. Number of rows gone
int * permute_
main permute.
virtual void solveKKT(CoinWorkDouble *region1, CoinWorkDouble *region2, const CoinWorkDouble *diagonal, CoinWorkDouble diagonalScaleFactor)
Uses factorization to solve.
int symbolic1(const int *Astart, const int *Arow)
Symbolic1 - works out size without clever stuff.
int * indexStart_
Index starts.
virtual ClpCholeskyBase * clone() const
char * whichDense_
Dense indicators.
virtual int factorize(const CoinWorkDouble *diagonal, int *rowsDropped)
Factorize - filling in rowsDropped and returning number dropped.
int integerParameters_[64]
integerParameters
void updateDense(longDouble *d, int *first)
Updates dense part (broken out for profiling)
char * rowsDropped_
rowsDropped
longDouble * sparseFactor() const
Return sparseFactor.
virtual int order(ClpInterior *model)
Orders rows and saves pointer to matrix.and model.
int orderAMD()
AMD ordering.
virtual ~ClpCholeskyBase()
Destructor (has to be public)
void setType(int type)
Sets type.
int * permuteInverse_
permute inverse.