1 /* $Id: ClpCholeskyUfl.hpp 2385 2019-01-06 19:43:06Z unxusr $ */ 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 ClpCholeskyUfl_H 7 #define ClpCholeskyUfl_H 8 9 #include "ClpCholeskyBase.hpp" 10 11 class ClpMatrixBase; 12 class ClpCholeskyDense; 13 14 typedef struct cholmod_factor_struct cholmod_factor; 15 typedef struct cholmod_common_struct cholmod_common; 16 17 /** Ufl class for Clp Cholesky factorization 18 19 If you wish to use AMD code from University of Florida see 20 21 http://www.cise.ufl.edu/research/sparse/amd 22 23 for terms of use 24 25 If you wish to use CHOLMOD code from University of Florida see 26 27 http://www.cise.ufl.edu/research/sparse/cholmod 28 29 for terms of use 30 31 */ 32 class ClpCholeskyUfl : public ClpCholeskyBase { 33 34 public: 35 /**@name Virtual methods that the derived classes provides */ 36 //@{ 37 /** Orders rows and saves pointer to matrix.and model. 38 Returns non-zero if not enough memory */ 39 virtual int order(ClpInterior *model); 40 /** Does Symbolic factorization given permutation using CHOLMOD (if available). 41 This is called immediately after order. If user provides this then 42 user must provide factorize and solve. Otherwise the default factorization is used 43 returns non-zero if not enough memory. */ 44 virtual int symbolic(); 45 /** Factorize - filling in rowsDropped and returning number dropped using CHOLMOD (if available). 46 If return code negative then out of memory */ 47 virtual int factorize(const double *diagonal, int *rowsDropped); 48 /** Uses factorization to solve. Uses CHOLMOD (if available). */ 49 virtual void solve(double *region); 50 //@} 51 52 /**@name Constructors, destructor */ 53 //@{ 54 /** Constructor which has dense columns activated. 55 Default is off. */ 56 ClpCholeskyUfl(int denseThreshold = -1); 57 /** Destructor */ 58 virtual ~ClpCholeskyUfl(); 59 /// Clone 60 virtual ClpCholeskyBase *clone() const; 61 //@} 62 63 private: 64 cholmod_factor *L_; 65 cholmod_common *c_; 66 67 // Copy 68 ClpCholeskyUfl(const ClpCholeskyUfl &); 69 // Assignment 70 ClpCholeskyUfl &operator=(const ClpCholeskyUfl &); 71 }; 72 73 #endif 74 75 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 76 */ 77