14 auto actualValuesSize = values.
size();
16 if (actualValuesSize > 0 && requiredValuesSize > 0 && actualValuesSize != requiredValuesSize) {
17 throw std::runtime_error(
"IFunctionGeneral: values object doesn't match domain.");
22 }
catch (
const std::bad_cast &) {
23 throw std::invalid_argument(
"Provided domain is not of type FunctionDomainGeneral.");
Represent a domain of a very general type.
Base class that represents the domain of a function.
virtual size_t size() const =0
Return the number of points in the domain.
A class to store values calculated by a function.
size_t size() const
Return the number of values.
static Kernel::Logger g_log
virtual size_t getNumberDomainColumns() const =0
Get number of columns that the domain must have.
virtual size_t getDefaultDomainSize() const
Get the default size of a domain.
size_t getValuesSize(const FunctionDomain &domain) const override
Get number of values for a given domain.
virtual void functionGeneral(const FunctionDomainGeneral &domain, FunctionValues &values) const =0
Provide a concrete function in an implementation that operates on a FunctionDomainGeneral.
void functionDeriv(const FunctionDomain &domain, Jacobian &jacobian) override
Derivatives of function with respect to active parameters.
virtual size_t getNumberValuesPerArgument() const =0
Get number of values per argument in the domain.
void function(const FunctionDomain &domain, FunctionValues &values) const override
Evaluates the function for all arguments in the domain.
void calNumericalDeriv(const FunctionDomain &domain, Jacobian &jacobian)
Calculate numerical derivatives.
Represents the Jacobian in IFitFunction::functionDeriv.