Template Class SummedGradientFunctionGradientFunctionAdapter¶
Defined in File functions.h
Inheritance Relationships¶
Base Types¶
public parpe::GradientFunction
(Class GradientFunction)public parpe::SummedGradientFunction< T >
(Template Class SummedGradientFunction)
Class Documentation¶
-
template<typename
T
>
classparpe
::
SummedGradientFunctionGradientFunctionAdapter
: public parpe::GradientFunction, public parpe::SummedGradientFunction<T>¶ Adapter / wrapper for SummedGradientFunction to GradientFunction.
Simply evaluates SummedGradientFunction on all datasets.
Public Functions
-
inline
SummedGradientFunctionGradientFunctionAdapter
(std::unique_ptr<SummedGradientFunction<T>> gradFun, std::vector<T> datasets)¶ SummedGradientFunctionGradientFunctionAdapter.
- Parameters
gradFun
: Function to be wrappeddatasets
: Datasets on which to evaluate
-
inline virtual FunctionEvaluationStatus
evaluate
(gsl::span<const double> parameters, double &fval, gsl::span<double> gradient, Logger *logger = nullptr, double *cpuTime = nullptr) const override¶
-
inline virtual FunctionEvaluationStatus
evaluate
(gsl::span<const double> parameters, T dataset, double &fval, gsl::span<double> gradient, Logger *logger, double *cpuTime) const override¶ Evaluate on single data point.
- Return
Evaluation status
- Parameters
parameters
: Parameter vector where the function is to be evaluateddataset
: The dataset on which to evaluate the functionfval
: Output argument for f(x)gradient
: Preallocated space for the gradient of size dim(parameters). Or gsl::span<double>() for evaluation without gradient.logger
: Optional Logger instance used for outputcputime
: Optional output argument to reoprt cpuTime consumed by the the function
-
inline virtual FunctionEvaluationStatus
evaluate
(gsl::span<const double> parameters, std::vector<T> datasets, double &fval, gsl::span<double> gradient, Logger *logger, double *cpuTime) const override¶ Evaluate on vector of data points.
- Return
Evaluation status
- Parameters
parameters
: Parameter vector where the function is to be evaluateddatasets
: The datasets on which to evaluate the functionfval
: Output argument for f(x)gradient
: Preallocated space for the gradient of size dim(parameters). Or gsl::span<double>() for evaluation without gradient.logger
: Optional Logger instance used for outputcputime
: Optional output argument to reoprt cpuTime consumed by the the function
-
inline virtual int
numParameters
() const override¶
-
inline virtual std::vector<std::string>
getParameterIds
() const override¶
-
inline SummedGradientFunction<T> *
getWrappedFunction
() const¶ Return pointer to the wrapped function (non-owning).
- Return
Pointer to wrapped function
-
inline