34 functionGradient = gsl::vector( 2 );
36 else functionGradient[0] = -1.0;
37 functionGradient[1] = -1.0;
38 functionHessian = gsl::matrix { 2, 2 };
39 functionHessian.set_all( 0.0 );
44 if( vector.size() < 2 )
return 0;
46 double const& x { vector[0] };
47 double const& s { vector[1] };
68 double const& x { vector[0] };
69 double const& s { vector[1] };
double functionValue
The function value.
void setVector(gsl::vector const &vector)
Set a vector and compute function value, gradient and Hessian efficiently.
gsl::vector functionGradient
The gradient value.
double operator()(gsl::vector const &vector)
The function operator: computes or according as is an upper or lower bound.
Namespace for details of ipo_function that are not normally needed to construct and solve a convex op...
virtual gsl::matrix hessian() const
virtual gsl::vector gradient() const
gsl::matrix functionHessian
The Hessian value.
PhaseIBoundedVariableFunctionAndDerivatives(double const b, bool const upperBound)
Construct from a function and bound.
Base class for Function and DerivativesEstimates.
bool const upperBound
A boolean value: true or false according as b is an upper bound or lower.