Clp  1.17.8
List of all members
ClpConstraintQuadratic Class Reference

Quadratic Constraint Class. More...

#include <ClpConstraintQuadratic.hpp>

+ Inheritance diagram for ClpConstraintQuadratic:
+ Collaboration diagram for ClpConstraintQuadratic:

Public Member Functions

Stuff
virtual int gradient (const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const
 Fills gradient. More...
 
virtual void resize (int newNumberColumns)
 Resize constraint. More...
 
virtual void deleteSome (int numberToDelete, const int *which)
 Delete columns in constraint. More...
 
virtual void reallyScale (const double *columnScale)
 Scale constraint. More...
 
virtual int markNonlinear (char *which) const
 Given a zeroed array sets nonquadratic columns to 1. More...
 
virtual int markNonzero (char *which) const
 Given a zeroed array sets possible nonzero coefficients to 1. More...
 
Constructors and destructors
 ClpConstraintQuadratic ()
 Default Constructor. More...
 
 ClpConstraintQuadratic (int row, int numberQuadraticColumns, int numberColumns, const CoinBigIndex *start, const int *column, const double *element)
 Constructor from quadratic. More...
 
 ClpConstraintQuadratic (const ClpConstraintQuadratic &rhs)
 Copy constructor . More...
 
ClpConstraintQuadraticoperator= (const ClpConstraintQuadratic &rhs)
 Assignment operator. More...
 
virtual ~ClpConstraintQuadratic ()
 Destructor. More...
 
virtual ClpConstraintclone () const
 Clone. More...
 
Gets and sets
virtual int numberCoefficients () const
 Number of coefficients. More...
 
int numberColumns () const
 Number of columns in constraint. More...
 
CoinBigIndex * start () const
 Column starts. More...
 
const int * column () const
 Columns. More...
 
const double * coefficient () const
 Coefficients. More...
 
- Public Member Functions inherited from ClpConstraint
virtual double functionValue (const ClpSimplex *model, const double *solution, bool useScaling=false, bool refresh=true) const
 Constraint function value. More...
 
 ClpConstraint ()
 Default Constructor. More...
 
 ClpConstraint (const ClpConstraint &)
 Copy constructor. More...
 
ClpConstraintoperator= (const ClpConstraint &rhs)
 Assignment operator. More...
 
virtual ~ClpConstraint ()
 Destructor. More...
 
int type ()
 Returns type, 0 linear, 1 nonlinear. More...
 
int rowNumber () const
 Row number (-1 is objective) More...
 
double functionValue () const
 Stored constraint function value. More...
 
double offset () const
 Constraint offset. More...
 
virtual void newXValues ()
 Say we have new primal solution - so may need to recompute. More...
 

Private Attributes

Private member data

Column starts

CoinBigIndex * start_
 
int * column_
 Column (if -1 then linear coefficient) More...
 
double * coefficient_
 Coefficients. More...
 
int numberColumns_
 Useful to have number of columns about. More...
 
int numberCoefficients_
 Number of coefficients in gradient. More...
 
int numberQuadraticColumns_
 Number of quadratic columns. More...
 

Additional Inherited Members

- Protected Attributes inherited from ClpConstraint
double * lastGradient_
 Gradient at last evaluation. More...
 
double functionValue_
 Value of non-linear part of constraint. More...
 
double offset_
 Value of offset for constraint. More...
 
int type_
 Type of constraint - linear is 1. More...
 
int rowNumber_
 Row number (-1 is objective) More...
 

Detailed Description

Quadratic Constraint Class.

Definition at line 17 of file ClpConstraintQuadratic.hpp.

Constructor & Destructor Documentation

◆ ClpConstraintQuadratic() [1/3]

ClpConstraintQuadratic::ClpConstraintQuadratic ( )

Default Constructor.

◆ ClpConstraintQuadratic() [2/3]

ClpConstraintQuadratic::ClpConstraintQuadratic ( int  row,
int  numberQuadraticColumns,
int  numberColumns,
const CoinBigIndex *  start,
const int *  column,
const double *  element 
)

Constructor from quadratic.

◆ ClpConstraintQuadratic() [3/3]

ClpConstraintQuadratic::ClpConstraintQuadratic ( const ClpConstraintQuadratic rhs)

Copy constructor .

◆ ~ClpConstraintQuadratic()

virtual ClpConstraintQuadratic::~ClpConstraintQuadratic ( )
virtual

Destructor.

Member Function Documentation

◆ gradient()

virtual int ClpConstraintQuadratic::gradient ( const ClpSimplex model,
const double *  solution,
double *  gradient,
double &  functionValue,
double &  offset,
bool  useScaling = false,
bool  refresh = true 
) const
virtual

Fills gradient.

If Quadratic then solution may be NULL, also returns true value of function and offset so we can use x not deltaX in constraint If refresh is false then uses last solution Uses model for scaling Returns non-zero if gradient udefined at current solution

Implements ClpConstraint.

◆ resize()

virtual void ClpConstraintQuadratic::resize ( int  newNumberColumns)
virtual

Resize constraint.

Implements ClpConstraint.

◆ deleteSome()

virtual void ClpConstraintQuadratic::deleteSome ( int  numberToDelete,
const int *  which 
)
virtual

Delete columns in constraint.

Implements ClpConstraint.

◆ reallyScale()

virtual void ClpConstraintQuadratic::reallyScale ( const double *  columnScale)
virtual

Scale constraint.

Implements ClpConstraint.

◆ markNonlinear()

virtual int ClpConstraintQuadratic::markNonlinear ( char *  which) const
virtual

Given a zeroed array sets nonquadratic columns to 1.

Returns number of nonquadratic columns

Implements ClpConstraint.

◆ markNonzero()

virtual int ClpConstraintQuadratic::markNonzero ( char *  which) const
virtual

Given a zeroed array sets possible nonzero coefficients to 1.

Returns number of nonzeros

Implements ClpConstraint.

◆ operator=()

ClpConstraintQuadratic& ClpConstraintQuadratic::operator= ( const ClpConstraintQuadratic rhs)

Assignment operator.

◆ clone()

virtual ClpConstraint* ClpConstraintQuadratic::clone ( ) const
virtual

Clone.

Implements ClpConstraint.

◆ numberCoefficients()

virtual int ClpConstraintQuadratic::numberCoefficients ( ) const
virtual

Number of coefficients.

Implements ClpConstraint.

◆ numberColumns()

int ClpConstraintQuadratic::numberColumns ( ) const
inline

Number of columns in constraint.

Definition at line 80 of file ClpConstraintQuadratic.hpp.

◆ start()

CoinBigIndex* ClpConstraintQuadratic::start ( ) const
inline

Column starts.

Definition at line 85 of file ClpConstraintQuadratic.hpp.

◆ column()

const int* ClpConstraintQuadratic::column ( ) const
inline

Columns.

Definition at line 90 of file ClpConstraintQuadratic.hpp.

◆ coefficient()

const double* ClpConstraintQuadratic::coefficient ( ) const
inline

Coefficients.

Definition at line 95 of file ClpConstraintQuadratic.hpp.

Member Data Documentation

◆ start_

CoinBigIndex* ClpConstraintQuadratic::start_
private

Definition at line 106 of file ClpConstraintQuadratic.hpp.

◆ column_

int* ClpConstraintQuadratic::column_
private

Column (if -1 then linear coefficient)

Definition at line 108 of file ClpConstraintQuadratic.hpp.

◆ coefficient_

double* ClpConstraintQuadratic::coefficient_
private

Coefficients.

Definition at line 110 of file ClpConstraintQuadratic.hpp.

◆ numberColumns_

int ClpConstraintQuadratic::numberColumns_
private

Useful to have number of columns about.

Definition at line 112 of file ClpConstraintQuadratic.hpp.

◆ numberCoefficients_

int ClpConstraintQuadratic::numberCoefficients_
private

Number of coefficients in gradient.

Definition at line 114 of file ClpConstraintQuadratic.hpp.

◆ numberQuadraticColumns_

int ClpConstraintQuadratic::numberQuadraticColumns_
private

Number of quadratic columns.

Definition at line 116 of file ClpConstraintQuadratic.hpp.


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