Changeset 2385 for trunk/Clp/src/ClpPdcoBase.hpp
 Timestamp:
 Jan 6, 2019 2:43:06 PM (4 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpPdcoBase.hpp
r1665 r2385 23 23 */ 24 24 25 class ClpPdcoBase 25 class ClpPdcoBase { 26 26 27 27 public: 28 29 30 virtual void matVecMult(ClpInterior * model, int mode, double * x, double *y) const = 0;28 /**@name Virtual methods that the derived classes must provide */ 29 //@{ 30 virtual void matVecMult(ClpInterior *model, int mode, double *x, double *y) const = 0; 31 31 32 virtual void getGrad(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &grad) const = 0;32 virtual void getGrad(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &grad) const = 0; 33 33 34 virtual void getHessian(ClpInterior * model, CoinDenseVector<double> &x, CoinDenseVector<double> &H) const = 0;34 virtual void getHessian(ClpInterior *model, CoinDenseVector< double > &x, CoinDenseVector< double > &H) const = 0; 35 35 36 virtual double getObj(ClpInterior * model, CoinDenseVector<double> &x) const = 0;36 virtual double getObj(ClpInterior *model, CoinDenseVector< double > &x) const = 0; 37 37 38 virtual void matPrecon(ClpInterior * model, double delta, double * x, double *y) const = 0;38 virtual void matPrecon(ClpInterior *model, double delta, double *x, double *y) const = 0; 39 39 40 //@} 41 //@{ 42 ///@name Other 43 /// Clone 44 virtual ClpPdcoBase * clone() const = 0; 45 /// Returns type 46 inline int type() const { 47 return type_; 48 }; 49 /// Sets type 50 inline void setType(int type) { 51 type_ = type; 52 }; 53 /// Returns size of d1 54 inline int sizeD1() const { 55 return 1; 56 }; 57 /// Returns d1 as scalar 58 inline double getD1() const { 59 return d1_; 60 }; 61 /// Returns size of d2 62 inline int sizeD2() const { 63 return 1; 64 }; 65 /// Returns d2 as scalar 66 inline double getD2() const { 67 return d2_; 68 }; 69 //@} 70 40 //@} 41 //@{ 42 ///@name Other 43 /// Clone 44 virtual ClpPdcoBase *clone() const = 0; 45 /// Returns type 46 inline int type() const 47 { 48 return type_; 49 }; 50 /// Sets type 51 inline void setType(int type) 52 { 53 type_ = type; 54 }; 55 /// Returns size of d1 56 inline int sizeD1() const 57 { 58 return 1; 59 }; 60 /// Returns d1 as scalar 61 inline double getD1() const 62 { 63 return d1_; 64 }; 65 /// Returns size of d2 66 inline int sizeD2() const 67 { 68 return 1; 69 }; 70 /// Returns d2 as scalar 71 inline double getD2() const 72 { 73 return d2_; 74 }; 75 //@} 71 76 72 77 protected: 73 74 /**@name Constructors, destructor<br> 78 /**@name Constructors, destructor<br> 75 79 <strong>NOTE</strong>: All constructors are protected. There's no need 76 80 to expose them, after all, this is an abstract class. */ 77 78 79 80 81 //@{ 82 /** Default constructor. */ 83 ClpPdcoBase(); 84 /** Destructor (has to be public) */ 81 85 public: 82 virtual ~ClpPdcoBase(); 83 protected: 84 // Copy 85 ClpPdcoBase(const ClpPdcoBase&); 86 // Assignment 87 ClpPdcoBase& operator=(const ClpPdcoBase&); 88 //@} 89 86 virtual ~ClpPdcoBase(); 90 87 91 88 protected: 92 /**@name Data members 89 // Copy 90 ClpPdcoBase(const ClpPdcoBase &); 91 // Assignment 92 ClpPdcoBase &operator=(const ClpPdcoBase &); 93 //@} 94 95 protected: 96 /**@name Data members 93 97 The data members are protected to allow access for derived classes. */ 94 95 96 97 98 99 100 98 //@{ 99 /// Should be dense vectors 100 double d1_; 101 double d2_; 102 /// type (may be useful) 103 int type_; 104 //@} 101 105 }; 102 106 103 107 #endif 108 109 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 110 */
Note: See TracChangeset
for help on using the changeset viewer.