33 functionGradient = gsl::vector( size );
34 functionGradient.set_all( 1.0 );
35 functionHessian = gsl::matrix { size, size };
36 functionHessian.set_all( 0.0 );
42 size_t const VSIZE { vector.size() };
43 if( 0 == VSIZE )
return 0;
44 return vector[VSIZE - 1];
53 for(
size_t i { 0 }; i < SIZE; ++i )
81 double const VSIZE = vector.size();
84 for(
size_t i = 0; i < SIZE; ++i )
double functionValue
The function value.
gsl::vector functionGradient
The gradient value.
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.
void setVector(gsl::vector const &vector)
Set a vector and compute function value, gradient and Hessian efficiently.
double operator()(gsl::vector const &vector)
The function operator: returns the last element of vector.
size_t getSize() const
Get size of vector for function arguments or zero for arbitrary size.
This class computes a function at a vector.
Base class for Function and DerivativesEstimates.
PhaseIObjectiveFunctionAndDerivatives(Function const &function)
Construct from a function.