Class GradientFunction¶
Defined in File functions.h
Inheritance Relationships¶
Derived Types¶
public parpe::HierarchicalOptimizationWrapper
(Class HierarchicalOptimizationWrapper)public parpe::OptimizationReporter
(Class OptimizationReporter)public parpe::SummedGradientFunctionGradientFunctionAdapter< T >
(Template Class SummedGradientFunctionGradientFunctionAdapter)
Class Documentation¶
-
class
parpe
::
GradientFunction
¶ The GradientFunction class is an interface for an arbitrary function f(x) and its gradient.
Subclassed by parpe::HierarchicalOptimizationWrapper, parpe::OptimizationReporter, parpe::SummedGradientFunctionGradientFunctionAdapter< T >
Public Functions
-
virtual FunctionEvaluationStatus
evaluate
(gsl::span<double const> parameters, double &fval, gsl::span<double> gradient) const¶ Evaluate the function f(x)
- Return
functionEvaluationSuccess on success, functionEvaluationFailure otherwise
- Parameters
parameters
: Point x at which to evaluate f(x). Must be of length numParameters().fval
: (output) Will be set to the function value f(x)gradient
: (output) If not gsl::span<double>(), will contain the gradient of f(x) at x. Must be of length numParameters().
-
virtual FunctionEvaluationStatus
evaluate
(gsl::span<double const> parameters, double &fval, gsl::span<double> gradient, Logger *logger, double *cpuTime) const = 0¶
-
virtual int
numParameters
() const = 0¶
-
virtual std::vector<std::string>
getParameterIds
() const = 0¶
-
virtual
~GradientFunction
() = default¶
-
virtual FunctionEvaluationStatus