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

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/Clp/src/ClpQuadraticObjective.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2003, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef ClpQuadraticObjective_H
    00004 #define ClpQuadraticObjective_H
    00005
    00006 #include "ClpObjective.hpp"
    00007 #include "CoinPackedMatrix.hpp"
    00008
    00009 //#############################################################################
    00010
    00015 class ClpQuadraticObjective : public ClpObjective {
    00016
    00017 public:
    00018
    00020
    00021
    00028   virtual double * gradient(const ClpSimplex * model,
    00029                             const double * solution, double & offset,bool refresh,
    00030                             int includeLinear=2);
    00032
    00034   virtual double reducedGradient(ClpSimplex * model, double * region,
    00035                                  bool useFeasibleCosts);
    00042   virtual double stepLength(ClpSimplex * model,
    00043                             const double * solution,
    00044                             const double * change,
    00045                             double maximumTheta,
    00046                             double & currentObj,
    00047                             double & predictedObj,
    00048                             double & thetaObj);
    00050   virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
    00051   virtual void resize(int newNumberColumns) ;
    00053   virtual void deleteSome(int numberToDelete, const int * which) ;
    00055   virtual void reallyScale(const double * columnScale) ;
    00059   virtual int markNonlinear(char * which);
    00060
    00062
    00063
    00065
    00066
    00067   ClpQuadraticObjective();
    00068
    00070   ClpQuadraticObjective(const double * linearObjective, int numberColumns,
    00071                         const CoinBigIndex * start,
    00072                         const int * column, const double * element,
    00073                         int numberExtendedColumns_=-1);
    00074
    00079   ClpQuadraticObjective(const ClpQuadraticObjective & rhs,int type=0);
    00083   ClpQuadraticObjective (const ClpQuadraticObjective &rhs,int numberColumns,
    00084                                       const int * whichColumns) ;
    00085
    00087   ClpQuadraticObjective & operator=(const ClpQuadraticObjective& rhs);
    00088
    00090   virtual ~ClpQuadraticObjective ();
    00091
    00093   virtual ClpObjective * clone() const;
    00097   virtual ClpObjective * subsetClone (int numberColumns,
    00098                                       const int * whichColumns) const;
    00099
    00101   void loadQuadraticObjective(const int numberColumns,
    00102                               const CoinBigIndex * start,
    00103                               const int * column, const double * element,
    00104                               int numberExtendedColumns=-1);
    00105   void loadQuadraticObjective (  const CoinPackedMatrix& matrix);
    00107   void deleteQuadraticObjective();
    00109
    00110
    00111
    00112    inline CoinPackedMatrix * quadraticObjective() const     { return quadraticObjective_; }
    00114    inline double * linearObjective() const     { return objective_; }
    00116   inline int numberExtendedColumns() const
    00117   {return numberExtendedColumns_;}
    00119   inline int numberColumns() const
    00120   {return numberColumns_;}
    00122   inline bool fullMatrix() const
    00123   { return fullMatrix_;}
    00125
    00126   //---------------------------------------------------------------------------
    00127
    00128 private:
    00131   CoinPackedMatrix * quadraticObjective_;
    00133   double * objective_;
    00135   double * gradient_;
    00137   int numberColumns_;
    00139   int numberExtendedColumns_;
    00141   bool fullMatrix_;
    00143 };
    00144
    00145 #endif