/build/buildd/clp-1.12.0/Clp/src/ClpConstraintLinear.hpp
Go to the documentation of this file.
00001 /* $Id: ClpConstraintLinear.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 ClpConstraintLinear_H
00005 #define ClpConstraintLinear_H
00006 
00007 #include "ClpConstraint.hpp"
00008 
00009 //#############################################################################
00010 
00015 class ClpConstraintLinear : 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      ClpConstraintLinear();
00057 
00059      ClpConstraintLinear(int row, int numberCoefficients, int numberColumns,
00060                          const int * column, const double * element);
00061 
00064      ClpConstraintLinear(const ClpConstraintLinear & rhs);
00065 
00067      ClpConstraintLinear & operator=(const ClpConstraintLinear& rhs);
00068 
00070      virtual ~ClpConstraintLinear ();
00071 
00073      virtual ClpConstraint * clone() const;
00075 
00076 
00077 
00078      virtual int numberCoefficients() const;
00080      inline int numberColumns() const {
00081           return numberColumns_;
00082      }
00084      inline const int * column() const {
00085           return column_;
00086      }
00088      inline const double * coefficient() const {
00089           return coefficient_;
00090      }
00092 
00093      //---------------------------------------------------------------------------
00094 
00095 private:
00098      int * column_;
00100      double * coefficient_;
00102      int numberColumns_;
00104      int numberCoefficients_;
00106 };
00107 
00108 #endif