20 #ifndef IPO_FUNCTION_HPP
21 #define IPO_FUNCTION_HPP
23 #include"../ipo/detail/GSL.hpp"
52 virtual double operator()( gsl::vector
const& vector ) = 0;
59 virtual gsl::vector
gradient( gsl::vector
const& vector );
66 virtual gsl::matrix
hessian( gsl::vector
const& vector );
76 virtual std::tuple<gsl::vector,gsl::matrix>
derivatives( gsl::vector
const& vector );
82 double h = std::sqrt( std::numeric_limits<double>::epsilon() );
87 double h2 = std::sqrt( h );
virtual std::tuple< gsl::vector, gsl::matrix > derivatives(gsl::vector const &vector)
Compute or estimate derivative values.
double h
Value used for default gradient estimates.
virtual double operator()(gsl::vector const &vector)=0
Compute a function value.
virtual gsl::vector gradient(gsl::vector const &vector)
Compute or estimate a gradient value.
double h2
Value used for default Hessian estimates.
Namespace for functions that can be used by ipo::Objective and ipo::Constraint.
This class computes a function at a vector.
Base class for Function and DerivativesEstimates.
Function(size_t const size=0)
Constructor.
size_t const size
Size of vector arguments to supply to subclass functions.
virtual gsl::matrix hessian(gsl::vector const &vector)
Compute or estimate a Hessian value.