6 #ifndef ClpQuadraticObjective_H
7 #define ClpQuadraticObjective_H
31 const double *solution,
double &offset,
bool refresh,
32 int includeLinear = 2);
37 bool useFeasibleCosts);
45 const double *solution,
53 virtual void resize(
int newNumberColumns);
55 virtual void deleteSome(
int numberToDelete,
const int *which);
57 virtual void reallyScale(
const double *columnScale);
73 const int *column,
const double *element,
85 const int *whichColumns);
99 const int *whichColumns)
const;
104 const int *column,
const double *element,
virtual ClpObjective * clone() const
Clone.
virtual void resize(int newNumberColumns)
Resize objective.
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns gradient.
double * objective_
Objective.
Quadratic Objective Class.
virtual ClpObjective * subsetClone(int numberColumns, const int *whichColumns) const
Subset clone.
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL)
virtual void reallyScale(const double *columnScale)
Scale objective.
void deleteQuadraticObjective()
Get rid of quadratic objective.
int numberColumns() const
Number of columns in quadratic objective.
Objective Abstract Base Class.
ClpQuadraticObjective & operator=(const ClpQuadraticObjective &rhs)
Assignment operator.
virtual double stepLength(ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double ¤tObj, double &predictedObj, double &thetaObj)
Returns step length which gives minimum of objective for solution + theta * change vector up to maxim...
virtual ~ClpQuadraticObjective()
Destructor.
int numberColumns_
Useful to have number of columns about.
int numberExtendedColumns() const
Length of linear objective which could be bigger.
This solves LPs using the simplex method.
int type() const
Returns type (above 63 is extra information)
void loadQuadraticObjective(const int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns=-1)
Load up quadratic objective.
Sparse Matrix Base Class.
bool fullMatrix() const
If a full or half matrix.
bool fullMatrix_
True if full symmetric matrix, false if half.
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Resize objective.
ClpQuadraticObjective()
Default Constructor.
virtual int markNonlinear(char *which)
Given a zeroed array sets nonlinear columns to 1.
CoinPackedMatrix * quadraticObjective_
double * gradient_
Gradient.
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
CoinPackedMatrix * quadraticObjective() const
Quadratic objective.
int numberExtendedColumns_
Also length of linear objective which could be bigger.
double * linearObjective() const
Linear objective.