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