Interior-point-optimisation  1.0-1
Interior-pointoptimisationlibrary
ipo_function::detail::PhaseIObjectiveFunctionAndDerivatives Class Reference

Objective function for Phase I (feasibility) of interior-point optimisation. More...

#include <PhaseIObjectiveFunctionAndDerivatives.hpp>

Inheritance diagram for ipo_function::detail::PhaseIObjectiveFunctionAndDerivatives:
Inheritance graph
Collaboration diagram for ipo_function::detail::PhaseIObjectiveFunctionAndDerivatives:
Collaboration graph

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

Detailed Description

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.

Constructor & Destructor Documentation

PhaseIObjectiveFunctionAndDerivatives::PhaseIObjectiveFunctionAndDerivatives ( Function const &  function)

Construct from a function.

Parameters
functionThe function

Definition at line 29 of file PhaseIObjectiveFunctionAndDerivatives.cc.

References ipo_function::detail::FunctionBase::getSize().

Member Function Documentation

gsl::vector PhaseIObjectiveFunctionAndDerivatives::gradient ( gsl::vector const &  vector)
virtual

The function operator: returns the gradient.

Parameters
vectorA vector argument
Returns
The gradient

Reimplemented from ipo_function::Function.

Definition at line 48 of file PhaseIObjectiveFunctionAndDerivatives.cc.

References ipo_function::GradientEstimate::functionGradient, and ipo_function::detail::FunctionBase::getSize().

gsl::matrix PhaseIObjectiveFunctionAndDerivatives::hessian ( gsl::vector const &  vector)
virtual

The function operator: returns the Hessian: a matrix of zeros.

Parameters
vectorA vector argument
Returns
The Hessian

Reimplemented from ipo_function::Function.

Definition at line 59 of file PhaseIObjectiveFunctionAndDerivatives.cc.

References ipo_function::DerivativesEstimates::functionHessian, and ipo_function::detail::FunctionBase::getSize().

double PhaseIObjectiveFunctionAndDerivatives::operator() ( gsl::vector const &  vector)
virtual

The function operator: returns the last element of vector.

Parameters
vectorA vector argument
Returns
The phase I function.

Implements ipo_function::Function.

Definition at line 41 of file PhaseIObjectiveFunctionAndDerivatives.cc.

void PhaseIObjectiveFunctionAndDerivatives::setVector ( gsl::vector const &  vector)
virtual

Set a vector and compute function value, gradient and Hessian efficiently.

Parameters
vectorA 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().


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