Interior-point-optimisation
1.0-1
Interior-pointoptimisationlibrary
|
Objective function for Phase I (feasibility) of interior-point optimisation. More...
#include <PhaseIObjectiveFunctionAndDerivatives.hpp>
Public Member Functions | |
PhaseIObjectiveFunctionAndDerivatives (Function const &function) | |
Construct from a function. More... | |
double | operator() (gsl::vector const &vector) |
The function operator: returns the last element of vector. More... | |
gsl::vector | gradient (gsl::vector const &vector) |
The function operator: returns the gradient. More... | |
gsl::matrix | hessian (gsl::vector const &vector) |
The function operator: returns the Hessian: a matrix of zeros. More... | |
void | setVector (gsl::vector const &vector) |
Set a vector and compute function value, gradient and Hessian efficiently. More... | |
Public Member Functions inherited from ipo_function::Function | |
Function (size_t const size=0) | |
Constructor. More... | |
virtual std::tuple < gsl::vector, gsl::matrix > | derivatives (gsl::vector const &vector) |
Compute or estimate derivative values. More... | |
Public Member Functions inherited from ipo_function::detail::FunctionBase | |
FunctionBase (size_t const size=0) | |
Constructor. More... | |
virtual | ~FunctionBase ()=0 |
Make the class abstract. More... | |
size_t | getSize () const |
Get size of vector for function arguments or zero for arbitrary size. More... | |
Public Member Functions inherited from ipo_function::DerivativesEstimates | |
DerivativesEstimates (size_t const size=0) | |
Constructor. More... | |
virtual gsl::matrix | hessian () const |
Public Member Functions inherited from ipo_function::GradientEstimate | |
GradientEstimate (size_t const size=0) | |
Constructor. More... | |
virtual double | value () const |
virtual gsl::vector | gradient () const |
Additional Inherited Members | |
Protected Attributes inherited from ipo_function::Function | |
double | h = std::sqrt( std::numeric_limits<double>::epsilon() ) |
Value used for default gradient estimates. More... | |
double | h2 = std::sqrt( h ) |
Value used for default Hessian estimates. More... | |
Protected Attributes inherited from ipo_function::detail::FunctionBase | |
size_t const | size |
Size of vector arguments to supply to subclass functions. More... | |
Protected Attributes inherited from ipo_function::DerivativesEstimates | |
gsl::matrix | functionHessian |
The Hessian value. More... | |
Protected Attributes inherited from ipo_function::GradientEstimate | |
double | functionValue |
The function value. More... | |
gsl::vector | functionGradient |
The gradient value. More... | |
Objective function for Phase I (feasibility) of interior-point optimisation.
The function is constructed from another function (the Phase II objective), though only the size of the other function objective is used. The function does no more than return the value of the last element of its vector argument.
This class also computes derivatives.
Definition at line 36 of file PhaseIObjectiveFunctionAndDerivatives.hpp.
PhaseIObjectiveFunctionAndDerivatives::PhaseIObjectiveFunctionAndDerivatives | ( | Function const & | function | ) |
Construct from a function.
function | The function |
Definition at line 29 of file PhaseIObjectiveFunctionAndDerivatives.cc.
References ipo_function::detail::FunctionBase::getSize().
|
virtual |
The function operator: returns the gradient.
vector | A vector argument |
Reimplemented from ipo_function::Function.
Definition at line 48 of file PhaseIObjectiveFunctionAndDerivatives.cc.
References ipo_function::GradientEstimate::functionGradient, and ipo_function::detail::FunctionBase::getSize().
|
virtual |
The function operator: returns the Hessian: a matrix of zeros.
vector | A vector argument |
Reimplemented from ipo_function::Function.
Definition at line 59 of file PhaseIObjectiveFunctionAndDerivatives.cc.
References ipo_function::DerivativesEstimates::functionHessian, and ipo_function::detail::FunctionBase::getSize().
|
virtual |
The function operator: returns the last element of vector.
vector | A vector argument |
Implements ipo_function::Function.
Definition at line 41 of file PhaseIObjectiveFunctionAndDerivatives.cc.
|
virtual |
Set a vector and compute function value, gradient and Hessian efficiently.
vector | A vector argument |
Implements ipo_function::GradientEstimate.
Definition at line 71 of file PhaseIObjectiveFunctionAndDerivatives.cc.
References ipo_function::GradientEstimate::functionGradient, ipo_function::DerivativesEstimates::functionHessian, ipo_function::GradientEstimate::functionValue, and ipo_function::detail::FunctionBase::getSize().