Cbc  2.9.9
ClpCholeskyDense.hpp
Go to the documentation of this file.
1 /* \$Id: ClpCholeskyDense.hpp 1910 2013-01-27 02:00:13Z stefan \$ */
2 /*
5
7 */
8 #ifndef ClpCholeskyDense_H
9 #define ClpCholeskyDense_H
10
11 #include "ClpCholeskyBase.hpp"
12 class ClpMatrixBase;
13
15
16 public:
21  virtual int order(ClpInterior * model) ;
26  virtual int symbolic();
29  virtual int factorize(const CoinWorkDouble * diagonal, int * rowsDropped) ;
31  virtual void solve (CoinWorkDouble * region) ;
39  int reserveSpace(const ClpCholeskyBase * factor, int numberRows) ;
41  CoinBigIndex space( int numberRows) const;
43  void factorizePart2(int * rowsDropped) ;
45  void factorizePart3(int * rowsDropped) ;
47  void solveF1(longDouble * a, int n, CoinWorkDouble * region);
48  void solveF2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
50  void solveB1(longDouble * a, int n, CoinWorkDouble * region);
51  void solveB2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
52  int bNumber(const longDouble * array, int &, int&);
54  inline longDouble * aMatrix() const {
55  return sparseFactor_;
56  }
58  inline longDouble * diagonal() const {
59  return diagonal_;
60  }
69  virtual ~ClpCholeskyDense();
75  virtual ClpCholeskyBase * clone() const ;
79 private:
85 };
86
87 /* structure for C */
88 typedef struct {
92  int * rowsDropped;
93  double doubleParameters_[1]; /* corresponds to 10 */
94  int integerParameters_[2]; /* corresponds to 34, nThreads */
95  int n;
98
99 extern "C" {
100  void ClpCholeskySpawn(void *);
101 }
103 void
105  longDouble * a, int n, int numberBlocks,
106  longDouble * diagonal, longDouble * work, int * rowsDropped);
107
109 void
111  longDouble * aTri, int nThis,
112  longDouble * aUnder, longDouble * diagonal,
113  longDouble * work,
114  int nLeft, int iBlock, int jBlock,
115  int numberBlocks);
117 void
119  longDouble * aUnder, int nTri, int nDo,
120  int iBlock, int jBlock, longDouble * aTri,
121  longDouble * diagonal, longDouble * work,
122  int numberBlocks);
127 void
129  longDouble * above, int nUnder, int nUnderK,
130  int nDo, longDouble * aUnder, longDouble *aOther,
131  longDouble * work,
132  int iBlock, int jBlock,
133  int numberBlocks);
135 void
137  longDouble * a, int n,
138  longDouble * diagonal, longDouble * work,
139  int * rowsDropped);
141 void
142 ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/
143  longDouble * aTri, longDouble * aUnder,
144  longDouble * diagonal, longDouble * work,
145  int nUnder);
147 void
148 ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */
149  longDouble * aUnder, longDouble * aTri,
150  /*longDouble * diagonal,*/ longDouble * work, int nUnder);
155 void
156 ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */
157  const longDouble * COIN_RESTRICT above,
158  const longDouble * COIN_RESTRICT aUnder,
159  longDouble * COIN_RESTRICT aOther,
160  const longDouble * COIN_RESTRICT work,
161  int nUnder);
162 #endif
longDouble * diagonal_
ClpCholeskyDense & operator=(const ClpCholeskyDense &)
Assignment.
Abstract base class for Clp Matrices.
This solves LPs using interior point methods.
Definition: ClpInterior.hpp:72
ClpCholeskyDense()
Default constructor.
char * rowsDropped() const
rowsDropped - which rows are gone
longDouble * sparseFactor_
sparseFactor.
virtual int factorize(const CoinWorkDouble *diagonal, int *rowsDropped)
Factorize - filling in rowsDropped and returning number dropped.
void solveF2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2)
void ClpCholeskyCfactorLeaf(ClpCholeskyDenseC *thisStruct, longDouble *a, int n, longDouble *diagonal, longDouble *work, int *rowsDropped)
Leaf recursive factor.
void solveB2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2)
void ClpCholeskyCrecTriLeaf(longDouble *aUnder, longDouble *aTri, longDouble *work, int nUnder)
Leaf recursive rectangle triangle update.
int reserveSpace(const ClpCholeskyBase *factor, int numberRows)
Reserves space.
longDouble * diagonal() const
Diagonal.
Base class for Clp Cholesky factorization Will do better factorization.
#define COIN_RESTRICT
void solveF1(longDouble *a, int n, CoinWorkDouble *region)
Forward part of solve.
void ClpCholeskyCrecRecLeaf(const longDouble *COIN_RESTRICT above, const longDouble *COIN_RESTRICT aUnder, longDouble *COIN_RESTRICT aOther, const longDouble *COIN_RESTRICT work, int nUnder)
Leaf recursive rectangle rectangle update, nUnder is number of rows in iBlock, nUnderK is number of r...
void ClpCholeskyCrecRec(ClpCholeskyDenseC *thisStruct, longDouble *above, int nUnder, int nUnderK, int nDo, longDouble *aUnder, longDouble *aOther, longDouble *work, int iBlock, int jBlock, int numberBlocks)
Non leaf recursive rectangle rectangle update, nUnder is number of rows in iBlock, nUnderK is number of rows in kBlock.
int bNumber(const longDouble *array, int &, int &)
int numberRows() const
Return number of rows.
void ClpCholeskyCrecTri(ClpCholeskyDenseC *thisStruct, longDouble *aUnder, int nTri, int nDo, int iBlock, int jBlock, longDouble *aTri, longDouble *diagonal, longDouble *work, int numberBlocks)
Non leaf recursive rectangle triangle update.
longDouble * diagonal_
Diagonal.
void factorizePart3(int *rowsDropped)
part 2 of Factorize - filling in rowsDropped - blocked
void ClpCholeskyCtriRecLeaf(longDouble *aTri, longDouble *aUnder, longDouble *diagonal, longDouble *work, int nUnder)
Leaf recursive triangle rectangle update.
virtual ~ClpCholeskyDense()
Destructor.
double longDouble
virtual int symbolic()
Does Symbolic factorization given permutation.
void factorizePart2(int *rowsDropped)
part 2 of Factorize - filling in rowsDropped
int CoinBigIndex
virtual void solve(CoinWorkDouble *region)
Uses factorization to solve.
double CoinWorkDouble
Definition: CoinTypes.hpp:53
longDouble * aMatrix() const
A.
virtual ClpCholeskyBase * clone() const
Clone.
CoinBigIndex space(int numberRows) const
Returns space needed.
void ClpCholeskySpawn(void *)
virtual int order(ClpInterior *model)
Orders rows and saves pointer to matrix.and model.
void solveB1(longDouble *a, int n, CoinWorkDouble *region)
Backward part of solve.
void ClpCholeskyCfactor(ClpCholeskyDenseC *thisStruct, longDouble *a, int n, int numberBlocks, longDouble *diagonal, longDouble *work, int *rowsDropped)
Non leaf recursive factor.
bool borrowSpace_
Just borrowing space.
void ClpCholeskyCtriRec(ClpCholeskyDenseC *thisStruct, longDouble *aTri, int nThis, longDouble *aUnder, longDouble *diagonal, longDouble *work, int nLeft, int iBlock, int jBlock, int numberBlocks)
Non leaf recursive triangle rectangle update.