ClpConstraintAmpl.hpp
Go to the documentation of this file.
1 /* $Id: ClpConstraintAmpl.hpp 1173 2009-06-04 09:44:10Z forrest $ */
2 // Copyright (C) 2007, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpConstraintAmpl_H
5 #define ClpConstraintAmpl_H
6 
7 #include "ClpConstraint.hpp"
8 
9 //#############################################################################
10 
15 class ClpConstraintAmpl : public ClpConstraint {
16 
17 public:
18 
20 
21 
22 
29  virtual int gradient(const ClpSimplex * model,
30  const double * solution,
31  double * gradient,
32  double & functionValue ,
33  double & offset,
34  bool useScaling = false,
35  bool refresh = true) const ;
37  virtual void resize(int newNumberColumns) ;
39  virtual void deleteSome(int numberToDelete, const int * which) ;
41  virtual void reallyScale(const double * columnScale) ;
45  virtual int markNonlinear(char * which) const ;
49  virtual int markNonzero(char * which) const;
51  virtual void newXValues() ;
53 
54 
56 
59 
61  ClpConstraintAmpl(int row, void * amplInfo);
62 
66 
69 
71  virtual ~ClpConstraintAmpl ();
72 
74  virtual ClpConstraint * clone() const;
76 
78  virtual int numberCoefficients() const;
81  inline const int * column() const {
82  return column_;
83  }
85  inline const double * coefficient() const {
86  return coefficient_;
87  }
89 
90  //---------------------------------------------------------------------------
91 
92 private:
95  void * amplInfo_;
97  int * column_;
99  double * coefficient_;
103 };
104 
105 #endif
106