- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ClpQuadraticObjective Class Reference

Quadratic Objective Class. More...

`#include <ClpQuadraticObjective.hpp>`

Inheritance diagram for ClpQuadraticObjective:

[legend]
Collaboration diagram for ClpQuadraticObjective:

[legend]
List of all members.

## Public Member Functions
Stuff
virtual double * | gradient (const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
| Returns gradient.
virtual double | reducedGradient (ClpSimplex *model, double *region, bool useFeasibleCosts)
| Returns reduced gradient.Returns an offset (to be added to current one).
virtual double | stepLength (ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double &currentObj, double &predictedObj, double &thetaObj)
| Returns step length which gives minimum of objective for solution + theta * change vector up to maximum theta.
virtual double | objectiveValue (const ClpSimplex *model, const double *solution) const
| Return objective value (without any ClpModel offset) (model may be NULL).
virtual void | resize (int newNumberColumns)
| Returns gradient.
virtual void | deleteSome (int numberToDelete, const int *which)
| Delete columns in objective.
virtual void | reallyScale (const double *columnScale)
| Scale objective.
virtual int | markNonlinear (char *which)
| Given a zeroed array sets nonlinear columns to 1.
Constructors and destructors
| ClpQuadraticObjective ()
| Default Constructor.
| ClpQuadraticObjective (const double *linearObjective, int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns_=-1)
| Constructor from objective.
| ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int type=0)
| Copy constructor .
| ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int numberColumns, const int *whichColumns)
| Subset constructor.
ClpQuadraticObjective & | operator= (const ClpQuadraticObjective &rhs)
| Assignment operator.
virtual | ~ClpQuadraticObjective ()
| Destructor.
virtual ClpObjective * | clone () const
| Clone.
virtual ClpObjective * | subsetClone (int numberColumns, const int *whichColumns) const
| Subset clone.
void | loadQuadraticObjective (const int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns=-1)
| Load up quadratic objective.
void | loadQuadraticObjective (const CoinPackedMatrix &matrix)
| Default Constructor.
void | deleteQuadraticObjective ()
| Get rid of quadratic objective.
Gets and sets
CoinPackedMatrix * | quadraticObjective () const
| Quadratic objective.
double * | linearObjective () const
| Linear objective.
int | numberExtendedColumns () const
| Length of linear objective which could be bigger.
int | numberColumns () const
| Number of columns in quadratic objective.
bool | fullMatrix () const
| If a full or half matrix.
## Private Attributes
Private member data
Quadratic objective
CoinPackedMatrix * | quadraticObjective_
double * | objective_
| Objective.
double * | gradient_
| Gradient.
int | numberColumns_
| Useful to have number of columns about.
int | numberExtendedColumns_
| Also length of linear objective which could be bigger.
bool | fullMatrix_
| True if full symmetric matrix, false if half.

## Detailed Description

Quadratic Objective Class.

Definition at line 15 of file ClpQuadraticObjective.hpp.

## Constructor & Destructor Documentation

ClpQuadraticObjective::ClpQuadraticObjective | ( |  | ) |

Default Constructor.

ClpQuadraticObjective::ClpQuadraticObjective | ( | const double * | linearObjective,
|  | int | numberColumns,
|  | const CoinBigIndex * | start,
|  | const int * | column,
|  | const double * | element,
|  | int | numberExtendedColumns_ = `-1` |
| ) |  |  |

Constructor from objective.

ClpQuadraticObjective::ClpQuadraticObjective | ( | const ClpQuadraticObjective & | rhs,
|  | int | type = `0` |
| ) |  |  |

Copy constructor .

If type is -1 then make sure half symmetric, if +1 then make sure full

ClpQuadraticObjective::ClpQuadraticObjective | ( | const ClpQuadraticObjective & | rhs,
|  | int | numberColumns,
|  | const int * | whichColumns |
| ) |  |  |

Subset constructor.

Duplicates are allowed and order is as given.

virtual ClpQuadraticObjective::~ClpQuadraticObjective | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual double* ClpQuadraticObjective::gradient | ( | const ClpSimplex * | model,
|  | const double * | solution,
|  | double & | offset,
|  | bool | refresh,
|  | int | includeLinear = `2` |
| ) |  |  | `[virtual]`

Returns gradient.

If Quadratic then solution may be NULL, also returns an offset (to be added to current one) If refresh is false then uses last solution Uses model for scaling includeLinear 0 - no, 1 as is, 2 as feasible

Implements ClpObjective.

virtual double ClpQuadraticObjective::reducedGradient | ( | ClpSimplex * | model,
|  | double * | region,
|  | bool | useFeasibleCosts |
| ) |  |  | `[virtual]`

Returns reduced gradient.Returns an offset (to be added to current one).

Implements ClpObjective.

virtual double ClpQuadraticObjective::stepLength | ( | ClpSimplex * | model,
|  | const double * | solution,
|  | const double * | change,
|  | double | maximumTheta,
|  | double & | currentObj,
|  | double & | predictedObj,
|  | double & | thetaObj |
| ) |  |  | `[virtual]`

Returns step length which gives minimum of objective for solution + theta * change vector up to maximum theta.

arrays are numberColumns+numberRows Also sets current objective, predicted and at maximumTheta

Implements ClpObjective.

virtual double ClpQuadraticObjective::objectiveValue | ( | const ClpSimplex * | model,
|  | const double * | solution |
| ) |  |  | const`[virtual]`

Return objective value (without any ClpModel offset) (model may be NULL).

Implements ClpObjective.

virtual void ClpQuadraticObjective::resize | ( | int | newNumberColumns | ) | `[virtual]`

Returns gradient.

If Quadratic then solution may be NULL, also returns an offset (to be added to current one) If refresh is false then uses last solution Uses model for scaling includeLinear 0 - no, 1 as is, 2 as feasible

Implements ClpObjective.

virtual void ClpQuadraticObjective::deleteSome | ( | int | numberToDelete,
|  | const int * | which |
| ) |  |  | `[virtual]`

Delete columns in objective.

Implements ClpObjective.

virtual void ClpQuadraticObjective::reallyScale | ( | const double * | columnScale | ) | `[virtual]`

Scale objective.

Implements ClpObjective.

virtual int ClpQuadraticObjective::markNonlinear | ( | char * | which | ) | `[virtual]`

Given a zeroed array sets nonlinear columns to 1.

Returns number of nonlinear columns

Reimplemented from ClpObjective.

ClpQuadraticObjective& ClpQuadraticObjective::operator= | ( | const ClpQuadraticObjective & | rhs | ) |

Assignment operator.

virtual ClpObjective* ClpQuadraticObjective::clone | ( |  | ) | const`[virtual]`

Clone.

Implements ClpObjective.

virtual ClpObjective* ClpQuadraticObjective::subsetClone | ( | int | numberColumns,
|  | const int * | whichColumns |
| ) |  |  | const`[virtual]`

Subset clone.

Duplicates are allowed and order is as given.

Reimplemented from ClpObjective.

void ClpQuadraticObjective::loadQuadraticObjective | ( | const int | numberColumns,
|  | const CoinBigIndex * | start,
|  | const int * | column,
|  | const double * | element,
|  | int | numberExtendedColumns = `-1` |
| ) |  |  |

Load up quadratic objective.

This is stored as a CoinPackedMatrix

void ClpQuadraticObjective::loadQuadraticObjective | ( | const CoinPackedMatrix & | matrix | ) |

Default Constructor.

void ClpQuadraticObjective::deleteQuadraticObjective | ( |  | ) |

Get rid of quadratic objective.

CoinPackedMatrix* ClpQuadraticObjective::quadraticObjective | ( |  | ) | const`[inline]`

Quadratic objective.

Definition at line 112 of file ClpQuadraticObjective.hpp.

References quadraticObjective_.

double* ClpQuadraticObjective::linearObjective | ( |  | ) | const`[inline]`

Linear objective.

Definition at line 114 of file ClpQuadraticObjective.hpp.

References objective_.

int ClpQuadraticObjective::numberExtendedColumns | ( |  | ) | const`[inline]`

Length of linear objective which could be bigger.

Definition at line 116 of file ClpQuadraticObjective.hpp.

References numberExtendedColumns_.

int ClpQuadraticObjective::numberColumns | ( |  | ) | const`[inline]`

Number of columns in quadratic objective.

Definition at line 119 of file ClpQuadraticObjective.hpp.

References numberColumns_.

bool ClpQuadraticObjective::fullMatrix | ( |  | ) | const`[inline]`

If a full or half matrix.

Definition at line 122 of file ClpQuadraticObjective.hpp.

References fullMatrix_.

## Member Data Documentation

CoinPackedMatrix* ClpQuadraticObjective::quadraticObjective_`[private]`

Definition at line 131 of file ClpQuadraticObjective.hpp.

Referenced by quadraticObjective().

double* ClpQuadraticObjective::objective_`[private]`

Objective.

Definition at line 133 of file ClpQuadraticObjective.hpp.

Referenced by linearObjective().

double* ClpQuadraticObjective::gradient_`[private]`

Gradient.

Definition at line 135 of file ClpQuadraticObjective.hpp.

int ClpQuadraticObjective::numberColumns_`[private]`

Useful to have number of columns about.

Definition at line 137 of file ClpQuadraticObjective.hpp.

Referenced by numberColumns().

int ClpQuadraticObjective::numberExtendedColumns_`[private]`

Also length of linear objective which could be bigger.

Definition at line 139 of file ClpQuadraticObjective.hpp.

Referenced by numberExtendedColumns().

bool ClpQuadraticObjective::fullMatrix_`[private]`

True if full symmetric matrix, false if half.

Definition at line 141 of file ClpQuadraticObjective.hpp.

Referenced by fullMatrix().

The documentation for this class was generated from the following file:

- /home/coin/SVN-release/Cgl-0.53.1/Clp/src/ClpQuadraticObjective.hpp