ClpConstraintQuadratic.hpp
Go to the documentation of this file.
1 /* $Id: ClpConstraintQuadratic.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2007, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpConstraintQuadratic_H
5 #define ClpConstraintQuadratic_H
6 
7 #include "ClpConstraint.hpp"
8 
9 //#############################################################################
10 
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 
52 
54 
57 
59  ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns,
60  const CoinBigIndex * start,
61  const int * column, const double * element);
62 
66 
69 
71  virtual ~ClpConstraintQuadratic ();
72 
74  virtual ClpConstraint * clone() const;
76 
78  virtual int numberCoefficients() const;
81  inline int numberColumns() const {
82  return numberColumns_;
83  }
85  inline CoinBigIndex * start() const {
86  return start_;
87  }
89  inline const int * column() const {
90  return column_;
91  }
93  inline const double * coefficient() const {
94  return coefficient_;
95  }
97 
98  //---------------------------------------------------------------------------
99 
100 private:
103  CoinBigIndex * start_;
105  int * column_;
107  double * coefficient_;
115 };
116 
117 #endif
virtual int gradient(const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const
Fills gradient.
ClpConstraintQuadratic()
Default Constructor.
const int * column() const
Columns.
Constraint Abstract Base Class.
int numberQuadraticColumns_
Number of quadratic columns.
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
virtual void resize(int newNumberColumns)
Resize constraint.
virtual int numberCoefficients() const
Number of coefficients.
CoinBigIndex * start() const
Column starts.
virtual void reallyScale(const double *columnScale)
Scale constraint.
int * column_
Column (if -1 then linear coefficient)
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
int numberColumns() const
Number of columns in constraint.
const double * coefficient() const
Coefficients.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:49
virtual ClpConstraint * clone() const
Clone.
virtual ~ClpConstraintQuadratic()
Destructor.
CoinBigIndex * start_
Column (if -1 then linear coefficient)
double * coefficient_
Coefficients.
double offset() const
Constraint offset.
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonquadratic columns to 1.
int numberColumns_
Useful to have number of columns about.
Quadratic Constraint Class.
ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic &rhs)
Assignment operator.
double functionValue() const
Stored constraint function value.
int numberCoefficients_
Number of coefficients in gradient.