/build/buildd/clp-1.12.0/Clp/src/ClpConstraintQuadratic.hpp
Go to the documentation of this file.
00001 /* $Id: ClpConstraintQuadratic.hpp 1525 2010-02-26 17:27:59Z mjs $ */
00002 // Copyright (C) 2007, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef ClpConstraintQuadratic_H
00005 #define ClpConstraintQuadratic_H
00006 
00007 #include "ClpConstraint.hpp"
00008 
00009 //#############################################################################
00010 
00015 class ClpConstraintQuadratic : public ClpConstraint {
00016 
00017 public:
00018 
00020 
00021 
00022 
00029      virtual int gradient(const ClpSimplex * model,
00030                           const double * solution,
00031                           double * gradient,
00032                           double & functionValue ,
00033                           double & offset,
00034                           bool useScaling = false,
00035                           bool refresh = true) const ;
00037      virtual void resize(int newNumberColumns) ;
00039      virtual void deleteSome(int numberToDelete, const int * which) ;
00041      virtual void reallyScale(const double * columnScale) ;
00045      virtual int markNonlinear(char * which) const ;
00049      virtual int markNonzero(char * which) const;
00051 
00052 
00054 
00055 
00056      ClpConstraintQuadratic();
00057 
00059      ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns,
00060                             const CoinBigIndex * start,
00061                             const int * column, const double * element);
00062 
00065      ClpConstraintQuadratic(const ClpConstraintQuadratic & rhs);
00066 
00068      ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic& rhs);
00069 
00071      virtual ~ClpConstraintQuadratic ();
00072 
00074      virtual ClpConstraint * clone() const;
00076 
00077 
00078 
00079      virtual int numberCoefficients() const;
00081      inline int numberColumns() const {
00082           return numberColumns_;
00083      }
00085      inline CoinBigIndex * start() const {
00086           return start_;
00087      }
00089      inline const int * column() const {
00090           return column_;
00091      }
00093      inline const double * coefficient() const {
00094           return coefficient_;
00095      }
00097 
00098      //---------------------------------------------------------------------------
00099 
00100 private:
00103      CoinBigIndex * start_;
00105      int * column_;
00107      double * coefficient_;
00109      int numberColumns_;
00111      int numberCoefficients_;
00113      int numberQuadraticColumns_;
00115 };
00116 
00117 #endif