ClpQuadraticObjective.hpp
Go to the documentation of this file.
1 /* $Id: ClpQuadraticObjective.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpQuadraticObjective_H
5 #define ClpQuadraticObjective_H
6 
7 #include "ClpObjective.hpp"
8 #include "CoinPackedMatrix.hpp"
9 
10 //#############################################################################
11 
17 
18 public:
19 
21 
22 
29  virtual double * gradient(const ClpSimplex * model,
30  const double * solution, double & offset, bool refresh,
31  int includeLinear = 2);
33 
35  virtual double reducedGradient(ClpSimplex * model, double * region,
36  bool useFeasibleCosts);
43  virtual double stepLength(ClpSimplex * model,
44  const double * solution,
45  const double * change,
46  double maximumTheta,
47  double & currentObj,
48  double & predictedObj,
49  double & thetaObj);
51  virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
52  virtual void resize(int newNumberColumns) ;
54  virtual void deleteSome(int numberToDelete, const int * which) ;
56  virtual void reallyScale(const double * columnScale) ;
60  virtual int markNonlinear(char * which);
61 
63 
64 
66 
67 
69 
72  const CoinBigIndex * start,
73  const int * column, const double * element,
74  int numberExtendedColumns_ = -1);
75 
80  ClpQuadraticObjective(const ClpQuadraticObjective & rhs, int type = 0);
84  ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int numberColumns,
85  const int * whichColumns) ;
86 
89 
91  virtual ~ClpQuadraticObjective ();
92 
94  virtual ClpObjective * clone() const;
98  virtual ClpObjective * subsetClone (int numberColumns,
99  const int * whichColumns) const;
100 
102  void loadQuadraticObjective(const int numberColumns,
103  const CoinBigIndex * start,
104  const int * column, const double * element,
105  int numberExtendedColumns = -1);
106  void loadQuadraticObjective ( const CoinPackedMatrix& matrix);
110 
111 
112 
113  inline CoinPackedMatrix * quadraticObjective() const {
114  return quadraticObjective_;
115  }
117  inline double * linearObjective() const {
118  return objective_;
119  }
121  inline int numberExtendedColumns() const {
122  return numberExtendedColumns_;
123  }
125  inline int numberColumns() const {
126  return numberColumns_;
127  }
129  inline bool fullMatrix() const {
130  return fullMatrix_;
131  }
133 
134  //---------------------------------------------------------------------------
135 
136 private:
139  CoinPackedMatrix * quadraticObjective_;
141  double * objective_;
143  double * gradient_;
151 };
152 
153 #endif