|
Interior-point-optimisation
1.0-1
Interior-pointoptimisationlibrary
|
This class estimates a function value, gradient and Hessian at a given vector. More...
#include <ForwardDifferenceDerivativesEstimates.hpp>


Public Member Functions | |
| ForwardDifferenceDerivativesEstimates (Function &function, double const h=std::sqrt(std::numeric_limits< double >::epsilon()), double const h2=std::sqrt(std::sqrt(std::numeric_limits< double >::epsilon()))) | |
| Find forward difference quotient estimates. More... | |
| ~ForwardDifferenceDerivativesEstimates ()=default | |
| Default destructor. More... | |
| ForwardDifferenceDerivativesEstimates (ForwardDifferenceDerivativesEstimates const &)=delete | |
| No copy constructor. More... | |
| ForwardDifferenceDerivativesEstimates & | operator= (ForwardDifferenceDerivativesEstimates const &)=delete |
| No copy operator. More... | |
| ForwardDifferenceDerivativesEstimates (ForwardDifferenceDerivativesEstimates &&de) | |
| Move constructor. More... | |
| ForwardDifferenceDerivativesEstimates & | operator= (ForwardDifferenceDerivativesEstimates &&de) |
| Move operator. More... | |
| virtual void | setVector (gsl::vector const &vector) |
| Set the vector to a new value. 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 |
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::detail::ForwardDifferenceGradientEstimate | |
| ForwardDifferenceGradientEstimate (Function &function, double const h=std::sqrt(std::numeric_limits< double >::epsilon())) | |
| Find forward difference quotient estimates. More... | |
Protected Attributes | |
| double const | h2 |
| The quotient size for hessian estimates: default is fourth root of machine epsilon. 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... | |
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::detail::ForwardDifferenceGradientEstimate | |
| Function & | function |
| The function. More... | |
| double const | h |
| The qotient size. More... | |
This class estimates a function value, gradient and Hessian at a given vector.
The function must be supplied as a Function. The vector must be supplied as a gsl::vector::vector. The gradient and Hessian are estimated using forward difference quotients. A forward difference quotient requires a value h and if no value is supplied, then the class uses the square root of the machine epsilon. This is a reasonably standard value and ensures that the function is evaluated with changes in approximately the lower half of the significant digits of the vector.
The values returned by gradient() and hessian() can be modified but should not be used once the object creating them no longer exists.
Definition at line 46 of file ForwardDifferenceDerivativesEstimates.hpp.
| ForwardDifferenceDerivativesEstimates::ForwardDifferenceDerivativesEstimates | ( | Function & | function, |
| double const | h = std::sqrt( std::numeric_limits<double>:: epsilon() ), |
||
| double const | h2 = std:: sqrt( std::sqrt( std::numeric_limits<double>:: epsilon() ) ) |
||
| ) |
Find forward difference quotient estimates.
| function | This is the function whose derivatives we estimate |
| h | The quotient size: default is square root of machine epsilon |
| h2 | The quotient size for hessian estimates: default is fourth root of machine epsilon |
Definition at line 29 of file ForwardDifferenceDerivativesEstimates.cc.
|
default |
Default destructor.
|
delete |
No copy constructor.
| ipo_function::detail::ForwardDifferenceDerivativesEstimates::ForwardDifferenceDerivativesEstimates | ( | ForwardDifferenceDerivativesEstimates && | de | ) |
Move constructor.
| de | Another DerivativesEstimate |
|
delete |
No copy operator.
| ForwardDifferenceDerivativesEstimates& ipo_function::detail::ForwardDifferenceDerivativesEstimates::operator= | ( | ForwardDifferenceDerivativesEstimates && | de | ) |
Move operator.
| de | Another DerivativesEstimate |
|
virtual |
Set the vector to a new value.
| vector | The new vector value |
Reimplemented from ipo_function::detail::ForwardDifferenceGradientEstimate.
Definition at line 33 of file ForwardDifferenceDerivativesEstimates.cc.
References ipo_function::DerivativesEstimates::functionHessian, ipo_function::GradientEstimate::functionValue, h2, and ipo_function::detail::ForwardDifferenceGradientEstimate::setVector().
|
protected |
The quotient size for hessian estimates: default is fourth root of machine epsilon.
Definition at line 99 of file ForwardDifferenceDerivativesEstimates.hpp.
Referenced by setVector().