Loading...
Searching...
No Matches
ClpConstraintQuadratic.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2007, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpConstraintQuadratic_H
#define ClpConstraintQuadratic_H
#include "ClpConstraint.hpp"
//#############################################################################
class ClpConstraintQuadratic : public ClpConstraint {
public:
virtual int gradient(const ClpSimplex *model,
const double *solution,
double *gradient,
double &functionValue,
double &offset,
bool useScaling = false,
bool refresh = true) const;
virtual void resize(int newNumberColumns);
virtual void deleteSome(int numberToDelete, const int *which);
virtual void reallyScale(const double *columnScale);
virtual int markNonlinear(char *which) const;
virtual int markNonzero(char *which) const;
ClpConstraintQuadratic();
ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns,
const CoinBigIndex *start,
const int *column, const double *element);
ClpConstraintQuadratic(const ClpConstraintQuadratic &rhs);
ClpConstraintQuadratic &operator=(const ClpConstraintQuadratic &rhs);
virtual ~ClpConstraintQuadratic();
virtual ClpConstraint *clone() const;
virtual int numberCoefficients() const;
inline int numberColumns() const
{
return numberColumns_;
}
inline CoinBigIndex *start() const
{
return start_;
}
inline const int *column() const
{
return column_;
}
inline const double *coefficient() const
{
return coefficient_;
}
//---------------------------------------------------------------------------
private:
CoinBigIndex *start_;
int *column_;
double *coefficient_;
int numberColumns_;
int numberCoefficients_;
int numberQuadraticColumns_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpConstraint.hpp
ClpConstraintQuadratic::ClpConstraintQuadratic
ClpConstraintQuadratic(int row, int numberQuadraticColumns, int numberColumns, const CoinBigIndex *start, const int *column, const double *element)
Constructor from quadratic.
ClpConstraintQuadratic::coefficient
const double * coefficient() const
Coefficients.
Definition ClpConstraintQuadratic.hpp:95
ClpConstraintQuadratic::start
CoinBigIndex * start() const
Column starts.
Definition ClpConstraintQuadratic.hpp:85
ClpConstraintQuadratic::numberQuadraticColumns_
int numberQuadraticColumns_
Number of quadratic columns.
Definition ClpConstraintQuadratic.hpp:116
ClpConstraintQuadratic::resize
virtual void resize(int newNumberColumns)
Resize constraint.
ClpConstraintQuadratic::numberColumns_
int numberColumns_
Useful to have number of columns about.
Definition ClpConstraintQuadratic.hpp:112
ClpConstraintQuadratic::markNonlinear
virtual int markNonlinear(char *which) const
Given a zeroed array sets nonquadratic columns to 1.
ClpConstraintQuadratic::start_
CoinBigIndex * start_
Definition ClpConstraintQuadratic.hpp:106
ClpConstraintQuadratic::markNonzero
virtual int markNonzero(char *which) const
Given a zeroed array sets possible nonzero coefficients to 1.
ClpConstraintQuadratic::numberColumns
int numberColumns() const
Number of columns in constraint.
Definition ClpConstraintQuadratic.hpp:80
ClpConstraintQuadratic::column
const int * column() const
Columns.
Definition ClpConstraintQuadratic.hpp:90
ClpConstraintQuadratic::numberCoefficients_
int numberCoefficients_
Number of coefficients in gradient.
Definition ClpConstraintQuadratic.hpp:114
ClpConstraintQuadratic::clone
virtual ClpConstraint * clone() const
Clone.
ClpConstraintQuadratic::reallyScale
virtual void reallyScale(const double *columnScale)
Scale constraint.
ClpConstraintQuadratic::~ClpConstraintQuadratic
virtual ~ClpConstraintQuadratic()
Destructor.
ClpConstraintQuadratic::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in constraint.
ClpConstraintQuadratic::ClpConstraintQuadratic
ClpConstraintQuadratic(const ClpConstraintQuadratic &rhs)
Copy constructor .
ClpConstraintQuadratic::column_
int * column_
Column (if -1 then linear coefficient).
Definition ClpConstraintQuadratic.hpp:108
ClpConstraintQuadratic::ClpConstraintQuadratic
ClpConstraintQuadratic()
Default Constructor.
ClpConstraintQuadratic::numberCoefficients
virtual int numberCoefficients() const
Number of coefficients.
ClpConstraintQuadratic::coefficient_
double * coefficient_
Coefficients.
Definition ClpConstraintQuadratic.hpp:110
ClpConstraintQuadratic::operator=
ClpConstraintQuadratic & operator=(const ClpConstraintQuadratic &rhs)
Assignment operator.
ClpConstraintQuadratic::gradient
virtual int gradient(const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const
Fills gradient.
ClpConstraint::functionValue
virtual double functionValue(const ClpSimplex *model, const double *solution, bool useScaling=false, bool refresh=true) const
Constraint function value.
ClpConstraint::offset
double offset() const
Constraint offset.
Definition ClpConstraint.hpp:100
ClpConstraint::ClpConstraint
ClpConstraint()
Default Constructor.
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106