Cgl  0.60.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
ClpConstraintLinear Class Reference

Linear Constraint Class. More...

#include <ClpConstraintLinear.hpp>

+ Inheritance diagram for ClpConstraintLinear:
+ Collaboration diagram for ClpConstraintLinear:

Public Member Functions

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 nonlinear columns to 1. More...
virtual int markNonzero (char *which) const
 Given a zeroed array sets possible nonzero coefficients to 1. More...
Constructors and destructors
 ClpConstraintLinear ()
 Default Constructor. More...
 ClpConstraintLinear (int row, int numberCoefficients, int numberColumns, const int *column, const double *element)
 Constructor from constraint. More...
 ClpConstraintLinear (const ClpConstraintLinear &rhs)
 Copy constructor . More...
ClpConstraintLinearoperator= (const ClpConstraintLinear &rhs)
 Assignment operator. More...
virtual ~ClpConstraintLinear ()
 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 linear constraint. 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


int * column_
double * coefficient_
 Coefficients. More...
int numberColumns_
 Useful to have number of columns about. More...
int numberCoefficients_
 Number of coefficients. 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

Linear Constraint Class.

Definition at line 17 of file ClpConstraintLinear.hpp.

Constructor & Destructor Documentation

ClpConstraintLinear::ClpConstraintLinear ( )

Default Constructor.

ClpConstraintLinear::ClpConstraintLinear ( int  row,
int  numberCoefficients,
int  numberColumns,
const int *  column,
const double *  element 

Constructor from constraint.

ClpConstraintLinear::ClpConstraintLinear ( const ClpConstraintLinear rhs)

Copy constructor .

virtual ClpConstraintLinear::~ClpConstraintLinear ( )


Member Function Documentation

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

Fills gradient.

If Linear 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.

virtual void ClpConstraintLinear::resize ( int  newNumberColumns)

Resize constraint.

Implements ClpConstraint.

virtual void ClpConstraintLinear::deleteSome ( int  numberToDelete,
const int *  which 

Delete columns in constraint.

Implements ClpConstraint.

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

Scale constraint.

Implements ClpConstraint.

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

Given a zeroed array sets nonlinear columns to 1.

Returns number of nonlinear columns

Implements ClpConstraint.

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

Given a zeroed array sets possible nonzero coefficients to 1.

Returns number of nonzeros

Implements ClpConstraint.

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

Assignment operator.

virtual ClpConstraint* ClpConstraintLinear::clone ( ) const


Implements ClpConstraint.

virtual int ClpConstraintLinear::numberCoefficients ( ) const

Number of coefficients.

Implements ClpConstraint.

int ClpConstraintLinear::numberColumns ( ) const

Number of columns in linear constraint.

Definition at line 79 of file ClpConstraintLinear.hpp.

const int* ClpConstraintLinear::column ( ) const


Definition at line 84 of file ClpConstraintLinear.hpp.

const double* ClpConstraintLinear::coefficient ( ) const


Definition at line 89 of file ClpConstraintLinear.hpp.

Member Data Documentation

int* ClpConstraintLinear::column_

Definition at line 100 of file ClpConstraintLinear.hpp.

double* ClpConstraintLinear::coefficient_


Definition at line 102 of file ClpConstraintLinear.hpp.

int ClpConstraintLinear::numberColumns_

Useful to have number of columns about.

Definition at line 104 of file ClpConstraintLinear.hpp.

int ClpConstraintLinear::numberCoefficients_

Number of coefficients.

Definition at line 106 of file ClpConstraintLinear.hpp.

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