- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.55.0/Clp/src/ClpQuadraticObjective.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpQuadraticObjective.hpp 1458 2009-11-05 12:34:07Z forrest $ */
    00002 // Copyright (C) 2003, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 #ifndef ClpQuadraticObjective_H
    00005 #define ClpQuadraticObjective_H
    00006
    00007 #include "ClpObjective.hpp"
    00008 #include "CoinPackedMatrix.hpp"
    00009
    00010 //#############################################################################
    00011
    00016 class ClpQuadraticObjective : public ClpObjective {
    00017
    00018 public:
    00019
    00021
    00022
    00029   virtual double * gradient(const ClpSimplex * model,
    00030                             const double * solution, double & offset,bool refresh,
    00031                             int includeLinear=2);
    00033
    00035   virtual double reducedGradient(ClpSimplex * model, double * region,
    00036                                  bool useFeasibleCosts);
    00043   virtual double stepLength(ClpSimplex * model,
    00044                             const double * solution,
    00045                             const double * change,
    00046                             double maximumTheta,
    00047                             double & currentObj,
    00048                             double & predictedObj,
    00049                             double & thetaObj);
    00051   virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
    00052   virtual void resize(int newNumberColumns) ;
    00054   virtual void deleteSome(int numberToDelete, const int * which) ;
    00056   virtual void reallyScale(const double * columnScale) ;
    00060   virtual int markNonlinear(char * which);
    00061
    00063
    00064
    00066
    00067
    00068   ClpQuadraticObjective();
    00069
    00071   ClpQuadraticObjective(const double * linearObjective, int numberColumns,
    00072                         const CoinBigIndex * start,
    00073                         const int * column, const double * element,
    00074                         int numberExtendedColumns_=-1);
    00075
    00080   ClpQuadraticObjective(const ClpQuadraticObjective & rhs,int type=0);
    00084   ClpQuadraticObjective (const ClpQuadraticObjective &rhs,int numberColumns,
    00085                                       const int * whichColumns) ;
    00086
    00088   ClpQuadraticObjective & operator=(const ClpQuadraticObjective& rhs);
    00089
    00091   virtual ~ClpQuadraticObjective ();
    00092
    00094   virtual ClpObjective * clone() const;
    00098   virtual ClpObjective * subsetClone (int numberColumns,
    00099                                       const int * whichColumns) const;
    00100
    00102   void loadQuadraticObjective(const int numberColumns,
    00103                               const CoinBigIndex * start,
    00104                               const int * column, const double * element,
    00105                               int numberExtendedColumns=-1);
    00106   void loadQuadraticObjective (  const CoinPackedMatrix& matrix);
    00108   void deleteQuadraticObjective();
    00110
    00111
    00112
    00113    inline CoinPackedMatrix * quadraticObjective() const     { return quadraticObjective_; }
    00115    inline double * linearObjective() const     { return objective_; }
    00117   inline int numberExtendedColumns() const
    00118   {return numberExtendedColumns_;}
    00120   inline int numberColumns() const
    00121   {return numberColumns_;}
    00123   inline bool fullMatrix() const
    00124   { return fullMatrix_;}
    00126
    00127   //---------------------------------------------------------------------------
    00128
    00129 private:
    00132   CoinPackedMatrix * quadraticObjective_;
    00134   double * objective_;
    00136   double * gradient_;
    00138   int numberColumns_;
    00140   int numberExtendedColumns_;
    00142   bool fullMatrix_;
    00144 };
    00145
    00146 #endif