00001 // Copyright (C) 2007, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef ClpConstraintAmpl_H 00004 #define ClpConstraintAmpl_H 00005 00006 #include "ClpConstraint.hpp" 00007 00008 //############################################################################# 00009 00014 class ClpConstraintAmpl : public ClpConstraint { 00015 00016 public: 00017 00019 00020 00021 00028 virtual int gradient(const ClpSimplex * model, 00029 const double * solution, 00030 double * gradient, 00031 double & functionValue , 00032 double & offset, 00033 bool useScaling=false, 00034 bool refresh=true) const ; 00036 virtual void resize(int newNumberColumns) ; 00038 virtual void deleteSome(int numberToDelete, const int * which) ; 00040 virtual void reallyScale(const double * columnScale) ; 00044 virtual int markNonlinear(char * which) const ; 00048 virtual int markNonzero(char * which) const; 00050 virtual void newXValues() ; 00052 00053 00055 00056 00057 ClpConstraintAmpl(); 00058 00060 ClpConstraintAmpl(int row, void * amplInfo); 00061 00064 ClpConstraintAmpl(const ClpConstraintAmpl & rhs); 00065 00067 ClpConstraintAmpl & operator=(const ClpConstraintAmpl& rhs); 00068 00070 virtual ~ClpConstraintAmpl (); 00071 00073 virtual ClpConstraint * clone() const; 00075 00076 00077 00078 virtual int numberCoefficients() const; 00080 inline const int * column() const 00081 { return column_;} 00083 inline const double * coefficient() const 00084 { return coefficient_;} 00086 00087 //--------------------------------------------------------------------------- 00088 00089 private: 00092 void * amplInfo_; 00094 int * column_; 00096 double * coefficient_; 00098 int numberCoefficients_; 00100 }; 00101 00102 #endif