Clp  1.17.8
ClpCholeskyDense.hpp
Go to the documentation of this file.
1 /* $Id$ */
2 /*
3  Copyright (C) 2003, International Business Machines Corporation
4  and others. All Rights Reserved.
5 
6  This code is licensed under the terms of the Eclipse Public License (EPL).
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  int 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  {
56  return sparseFactor_;
57  }
59  inline longDouble *diagonal() const
60  {
61  return diagonal_;
62  }
70  virtual ~ClpCholeskyDense();
76  virtual ClpCholeskyBase *clone() const;
79 private:
85 };
86 
87 /* structure for C */
88 typedef struct {
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 ClpCholeskyCfactor(ClpCholeskyDenseC *thisStruct,
104  longDouble *a, int n, int numberBlocks,
105  longDouble *diagonal, longDouble *work, int *rowsDropped);
106 
108 void ClpCholeskyCtriRec(ClpCholeskyDenseC *thisStruct,
109  longDouble *aTri, int nThis,
110  longDouble *aUnder, longDouble *diagonal,
111  longDouble *work,
112  int nLeft, int iBlock, int jBlock,
113  int numberBlocks);
115 void ClpCholeskyCrecTri(ClpCholeskyDenseC *thisStruct,
116  longDouble *aUnder, int nTri, int nDo,
117  int iBlock, int jBlock, longDouble *aTri,
118  longDouble *diagonal, longDouble *work,
119  int numberBlocks);
124 void ClpCholeskyCrecRec(ClpCholeskyDenseC *thisStruct,
125  longDouble *above, int nUnder, int nUnderK,
126  int nDo, longDouble *aUnder, longDouble *aOther,
127  longDouble *work,
128  int iBlock, int jBlock,
129  int numberBlocks);
132  longDouble *a, int n,
133  longDouble *diagonal, longDouble *work,
134  int *rowsDropped);
136 void ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/
137  longDouble *aTri, longDouble *aUnder,
138  longDouble *diagonal, longDouble *work,
139  int nUnder);
141 void ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */
142  longDouble *aUnder, longDouble *aTri,
143  /*longDouble * diagonal,*/ longDouble *work, int nUnder);
148 void ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */
149  const longDouble *COIN_RESTRICT above,
150  const longDouble *COIN_RESTRICT aUnder,
151  longDouble *COIN_RESTRICT aOther,
152  const longDouble *COIN_RESTRICT work,
153  int nUnder);
154 #endif
155 
156 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
157 */
longDouble
double longDouble
Definition: ClpCholeskyBase.hpp:40
ClpCholeskyDense::factorizePart2
void factorizePart2(int *rowsDropped)
part 2 of Factorize - filling in rowsDropped
ClpCholeskyDense::order
virtual int order(ClpInterior *model)
Orders rows and saves pointer to matrix.and model.
ClpCholeskyDenseC
Definition: ClpCholeskyDense.hpp:88
ClpCholeskyDenseC::work
longDouble * work
Definition: ClpCholeskyDense.hpp:91
ClpCholeskyCrecTriLeaf
void ClpCholeskyCrecTriLeaf(longDouble *aUnder, longDouble *aTri, longDouble *work, int nUnder)
Leaf recursive rectangle triangle update.
ClpCholeskyBase
Base class for Clp Cholesky factorization Will do better factorization.
Definition: ClpCholeskyBase.hpp:53
ClpCholeskyCtriRec
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.
ClpCholeskyDense::borrowSpace_
bool borrowSpace_
Just borrowing space.
Definition: ClpCholeskyDense.hpp:83
ClpCholeskyCfactorLeaf
void ClpCholeskyCfactorLeaf(ClpCholeskyDenseC *thisStruct, longDouble *a, int n, longDouble *diagonal, longDouble *work, int *rowsDropped)
Leaf recursive factor.
ClpCholeskyDense
Definition: ClpCholeskyDense.hpp:14
ClpCholeskyCtriRecLeaf
void ClpCholeskyCtriRecLeaf(longDouble *aTri, longDouble *aUnder, longDouble *diagonal, longDouble *work, int nUnder)
Leaf recursive triangle rectangle update.
ClpCholeskyDense::solveB2
void solveB2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2)
ClpCholeskyDense::solveF2
void solveF2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2)
ClpCholeskyDense::clone
virtual ClpCholeskyBase * clone() const
Clone.
ClpCholeskyBase::rowsDropped
char * rowsDropped() const
rowsDropped - which rows are gone
Definition: ClpCholeskyBase.hpp:102
ClpCholeskyCrecRec
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,...
ClpCholeskyDense::operator=
ClpCholeskyDense & operator=(const ClpCholeskyDense &)
Assignment.
ClpCholeskyDenseC::n
int n
Definition: ClpCholeskyDense.hpp:95
ClpCholeskyBase.hpp
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
ClpCholeskyDense::solve
virtual void solve(CoinWorkDouble *region)
Uses factorization to solve.
ClpCholeskyDenseC::rowsDropped
int * rowsDropped
Definition: ClpCholeskyDense.hpp:92
ClpCholeskyDenseC::a
longDouble * a
Definition: ClpCholeskyDense.hpp:90
ClpCholeskyDense::solveB1
void solveB1(longDouble *a, int n, CoinWorkDouble *region)
Backward part of solve.
COIN_RESTRICT
#define COIN_RESTRICT
Definition: ClpMatrixBase.hpp:21
ClpCholeskyCrecTri
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.
ClpCholeskyBase::diagonal_
longDouble * diagonal_
Diagonal.
Definition: ClpCholeskyBase.hpp:286
ClpInterior
This solves LPs using interior point methods.
Definition: ClpInterior.hpp:72
ClpCholeskyDense::bNumber
int bNumber(const longDouble *array, int &, int &)
ClpCholeskyCfactor
void ClpCholeskyCfactor(ClpCholeskyDenseC *thisStruct, longDouble *a, int n, int numberBlocks, longDouble *diagonal, longDouble *work, int *rowsDropped)
Non leaf recursive factor.
ClpCholeskyCrecRecLeaf
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...
ClpCholeskyBase::sparseFactor_
longDouble * sparseFactor_
sparseFactor.
Definition: ClpCholeskyBase.hpp:278
ClpCholeskyBase::numberRows
int numberRows() const
Return number of rows.
Definition: ClpCholeskyBase.hpp:127
ClpCholeskyDense::factorizePart3
void factorizePart3(int *rowsDropped)
part 2 of Factorize - filling in rowsDropped - blocked
ClpCholeskyDense::solveF1
void solveF1(longDouble *a, int n, CoinWorkDouble *region)
Forward part of solve.
ClpCholeskyDense::diagonal
longDouble * diagonal() const
Diagonal.
Definition: ClpCholeskyDense.hpp:59
ClpCholeskyDense::space
int space(int numberRows) const
Returns space needed.
ClpCholeskySpawn
void ClpCholeskySpawn(void *)
ClpCholeskyDense::reserveSpace
int reserveSpace(const ClpCholeskyBase *factor, int numberRows)
Reserves space.
ClpCholeskyDense::~ClpCholeskyDense
virtual ~ClpCholeskyDense()
Destructor
ClpCholeskyDenseC::diagonal_
longDouble * diagonal_
Definition: ClpCholeskyDense.hpp:89
ClpCholeskyDense::symbolic
virtual int symbolic()
Does Symbolic factorization given permutation.
ClpCholeskyDense::factorize
virtual int factorize(const CoinWorkDouble *diagonal, int *rowsDropped)
Factorize - filling in rowsDropped and returning number dropped.
ClpCholeskyDense::aMatrix
longDouble * aMatrix() const
A.
Definition: ClpCholeskyDense.hpp:54
ClpCholeskyDenseC::numberBlocks
int numberBlocks
Definition: ClpCholeskyDense.hpp:96
ClpCholeskyDense::ClpCholeskyDense
ClpCholeskyDense()
Default constructor.