Defines a view on a objective or constraint of a MINLP. More...
#include <MINLPView.h>
Public Member Functions | |
virtual | ~ObjConView () |
virtual int | dim () const =0 |
virtual const string & | name () const =0 |
virtual SepQcFunc::ftype | functype () const =0 |
virtual Func::CurvatureType | curvature () const =0 |
virtual double | evaluate (const UserVector< double > &x) const =0 |
Evaluates the constraint. | |
virtual double | evaluate (const double *x) const |
Evaluates the constraint. | |
virtual void | gradient (UserVector< double > &grad, const UserVector< double > &x) const =0 |
Computes the gradient of the constraint. | |
virtual void | gradient (double *grad, const double *x) const |
Computes the gradient of the constraint. | |
virtual double | gradientmult (const UserVector< double > &x, const UserVector< double > &factor) const |
Computes the product of the gradient of the constraint with a vector. | |
virtual double | evaluate_and_gradient (UserVector< double > &grad, const UserVector< double > &x) const |
Evaluates the constraint and computes is gradient. | |
virtual void | hessianmult (UserVector< double > &prod, const UserVector< double > &x, const UserVector< double > &factor) const =0 |
Computes the product of the hessian with a vector. |
Defines a view on a objective or constraint of a MINLP.
Definition at line 20 of file MINLPView.h.
virtual MINLPView::ObjConView::~ObjConView | ( | ) | [inline, virtual] |
Definition at line 22 of file MINLPView.h.
virtual int MINLPView::ObjConView::dim | ( | ) | const [pure virtual] |
virtual const string& MINLPView::ObjConView::name | ( | ) | const [pure virtual] |
virtual SepQcFunc::ftype MINLPView::ObjConView::functype | ( | ) | const [pure virtual] |
virtual Func::CurvatureType MINLPView::ObjConView::curvature | ( | ) | const [pure virtual] |
virtual double MINLPView::ObjConView::evaluate | ( | const UserVector< double > & | x | ) | const [pure virtual] |
Evaluates the constraint.
TODO: Can throw an evaluation exception.
x | The point where to evaluate the constraint. |
Implemented in MINLP::ObjConView< ObjOrCon >, MINLP::ConstraintView, MINLP::ObjectiveView, MINLP::ObjConView< MINLPData::Objective >, and MINLP::ObjConView< MINLPData::Constraint >.
virtual double MINLPView::ObjConView::evaluate | ( | const double * | x | ) | const [inline, virtual] |
Evaluates the constraint.
TODO: Can throw an evaluation exception.
x | The point where to evaluate the constraint. |
Definition at line 41 of file MINLPView.h.
virtual void MINLPView::ObjConView::gradient | ( | UserVector< double > & | grad, | |
const UserVector< double > & | x | |||
) | const [pure virtual] |
Computes the gradient of the constraint.
TODO: Can throw an evaluation exception.
grad | The vector to store the gradient in. | |
x | The point where to compute the gradient. |
Implemented in MINLP::ObjConView< ObjOrCon >, MINLP::ConstraintView, MINLP::ObjectiveView, MINLP::ObjConView< MINLPData::Objective >, and MINLP::ObjConView< MINLPData::Constraint >.
virtual void MINLPView::ObjConView::gradient | ( | double * | grad, | |
const double * | x | |||
) | const [virtual] |
Computes the gradient of the constraint.
TODO: Can throw an evaluation exception.
grad | The vector to store the gradient in. | |
x | The point where to compute the gradient. |
virtual double MINLPView::ObjConView::gradientmult | ( | const UserVector< double > & | x, | |
const UserVector< double > & | factor | |||
) | const [virtual] |
Computes the product of the gradient of the constraint with a vector.
TODO: Can throw an evaluation exception.
x | The point where to compute the gradient. | |
factor | The vector to multiply with. |
virtual double MINLPView::ObjConView::evaluate_and_gradient | ( | UserVector< double > & | grad, | |
const UserVector< double > & | x | |||
) | const [inline, virtual] |
Evaluates the constraint and computes is gradient.
TODO: Can throw an evaluation exception.
grad | The vector where the gradient is stored. | |
x | The point where to evaluate the constraint and to compute the gradient. |
Reimplemented in MINLP::ObjConView< ObjOrCon >, MINLP::ConstraintView, MINLP::ObjectiveView, MINLP::ObjConView< MINLPData::Objective >, and MINLP::ObjConView< MINLPData::Constraint >.
Definition at line 71 of file MINLPView.h.
virtual void MINLPView::ObjConView::hessianmult | ( | UserVector< double > & | prod, | |
const UserVector< double > & | x, | |||
const UserVector< double > & | factor | |||
) | const [pure virtual] |
Computes the product of the hessian with a vector.
TODO: Can throw an evaluation exception.
prod | The vector to store the product in. | |
x | The point where to evaluate the constraint. | |
factor | The vector to multiply the hessian with. |
Implemented in MINLP::ObjConView< ObjOrCon >, MINLP::ConstraintView, MINLP::ObjectiveView, MINLP::ObjConView< MINLPData::Objective >, and MINLP::ObjConView< MINLPData::Constraint >.