6 #ifndef ClpConstraint_H 
    7 #define ClpConstraint_H 
   33                           const double * solution,
 
   37                           bool useScaling = 
false,
 
   38                           bool refresh = 
true) 
const = 0;
 
   41                                    const double * solution,
 
   42                                    bool useScaling = 
false,
 
   43                                    bool refresh = 
true) 
const ;
 
   45      virtual void resize(
int newNumberColumns) = 0;
 
   47      virtual void deleteSome(
int numberToDelete, 
const int * which) = 0;
 
   49      virtual void reallyScale(
const double * columnScale) = 0;
 
double * lastGradient_
Gradient at last evaluation. 
 
double offset_
Value of offset for constraint. 
 
virtual int gradient(const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const =0
Fills gradient. 
 
ClpConstraint()
Default Constructor. 
 
int type_
Type of constraint - linear is 1. 
 
Constraint Abstract Base Class. 
 
virtual void reallyScale(const double *columnScale)=0
Scale constraint. 
 
virtual void resize(int newNumberColumns)=0
Resize constraint. 
 
virtual ~ClpConstraint()
Destructor. 
 
int rowNumber_
Row number (-1 is objective) 
 
virtual int numberCoefficients() const =0
Number of possible coefficients in gradient. 
 
virtual void deleteSome(int numberToDelete, const int *which)=0
Delete columns in constraint. 
 
virtual int markNonlinear(char *which) const =0
Given a zeroed array sets nonlinear columns to 1. 
 
virtual int markNonzero(char *which) const =0
Given a zeroed array sets possible nonzero coefficients to 1. 
 
ClpConstraint & operator=(const ClpConstraint &rhs)
Assignment operator. 
 
int rowNumber() const 
Row number (-1 is objective) 
 
This solves LPs using the simplex method. 
 
double offset() const 
Constraint offset. 
 
int type()
Returns type, 0 linear, 1 nonlinear. 
 
double functionValue() const 
Stored constraint function value. 
 
virtual ClpConstraint * clone() const =0
Clone. 
 
double functionValue_
Value of non-linear part of constraint. 
 
virtual void newXValues()
Say we have new primal solution - so may need to recompute.