1 | /* $Id: ClpCholeskyWssmpKKT.hpp 1665 2011-01-04 17:55:54Z lou $ */ |
2 | // Copyright (C) 2004, International Business Machines |
3 | // Corporation and others. All Rights Reserved. |
4 | // This code is licensed under the terms of the Eclipse Public License (EPL). |
5 | |
6 | #ifndef ClpCholeskyWssmpKKT_H |
7 | #define ClpCholeskyWssmpKKT_H |
8 | |
9 | #include "ClpCholeskyBase.hpp" |
10 | class ClpMatrixBase; |
11 | class ClpCholeskyDense; |
12 | |
13 | |
14 | /** WssmpKKT class for Clp Cholesky factorization |
15 | |
16 | */ |
17 | class ClpCholeskyWssmpKKT : public ClpCholeskyBase { |
18 | |
19 | public: |
20 | /**@name Virtual methods that the derived classes provides */ |
21 | //@{ |
22 | /** Orders rows and saves pointer to matrix.and model. |
23 | Returns non-zero if not enough memory */ |
24 | virtual int order(ClpInterior * model) override ; |
25 | /** Does Symbolic factorization given permutation. |
26 | This is called immediately after order. If user provides this then |
27 | user must provide factorize and solve. Otherwise the default factorization is used |
28 | returns non-zero if not enough memory */ |
29 | virtual int symbolic() override; |
30 | /** Factorize - filling in rowsDropped and returning number dropped. |
31 | If return code negative then out of memory */ |
32 | virtual int factorize(const double * diagonal, int * rowsDropped) override ; |
33 | /** Uses factorization to solve. */ |
34 | virtual void solve (double * region) override ; |
35 | /** Uses factorization to solve. - given as if KKT. |
36 | region1 is rows+columns, region2 is rows */ |
37 | virtual void solveKKT (double * region1, double * region2, const double * diagonal, |
38 | double diagonalScaleFactor) override; |
39 | //@} |
40 | |
41 | |
42 | /**@name Constructors, destructor */ |
43 | //@{ |
44 | /** Constructor which has dense columns activated. |
45 | Default is off. */ |
46 | ClpCholeskyWssmpKKT(int denseThreshold = -1); |
47 | /** Destructor */ |
48 | virtual ~ClpCholeskyWssmpKKT(); |
49 | // Copy |
50 | ClpCholeskyWssmpKKT(const ClpCholeskyWssmpKKT&); |
51 | // Assignment |
52 | ClpCholeskyWssmpKKT& operator=(const ClpCholeskyWssmpKKT&); |
53 | /// Clone |
54 | virtual ClpCholeskyBase * clone() const override ; |
55 | //@} |
56 | |
57 | |
58 | private: |
59 | /**@name Data members */ |
60 | //@{ |
61 | //@} |
62 | }; |
63 | |
64 | #endif |
65 | |