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

- File List
- File Members

# /home/coin/SVN-release/Alps-1.2.1/Clp/src/ClpQuadraticObjective.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpQuadraticObjective.hpp 1525 2010-02-26 17:27:59Z mjs $ */
    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     {
    00114           return quadraticObjective_;
    00115      }
    00117      inline double * linearObjective() const     {
    00118           return objective_;
    00119      }
    00121      inline int numberExtendedColumns() const {
    00122           return numberExtendedColumns_;
    00123      }
    00125      inline int numberColumns() const {
    00126           return numberColumns_;
    00127      }
    00129      inline bool fullMatrix() const {
    00130           return fullMatrix_;
    00131      }
    00133
    00134      //---------------------------------------------------------------------------
    00135
    00136 private:
    00139      CoinPackedMatrix * quadraticObjective_;
    00141      double * objective_;
    00143      double * gradient_;
    00145      int numberColumns_;
    00147      int numberExtendedColumns_;
    00149      bool fullMatrix_;
    00151 };
    00152
    00153 #endif