30 virtual std::string
name()
const = 0;
33 virtual std::string
shortName()
const {
return "Quality"; }
47 virtual double val()
const = 0;
51 virtual void deriv(std::vector<double> &der)
const = 0;
56 virtual double valAndDeriv(std::vector<double> &der)
const = 0;
66#define DECLARE_COSTFUNCTION(classname, username) \
68 Mantid::Kernel::RegistrationHelper register_costfunction_##classname( \
69 ((Mantid::API::CostFunctionFactory::Instance().subscribe<classname>(#username)), 0)); \
double value
The value of the point.
An interface for specifying the cost function to be used with Fit algorithm or minimizers,...
virtual double getParameter(size_t i) const =0
Get i-th parameter.
virtual ~ICostFunction()=default
Virtual destructor.
virtual std::string shortName() const
Get short name of minimizer - useful for say labels in guis.
virtual void setParameter(size_t i, const double &value)=0
Set i-th parameter.
virtual void deriv(std::vector< double > &der) const =0
Calculate the derivatives of the cost function.
virtual size_t nParams() const =0
Number of parameters.
virtual double val() const =0
Calculate value of cost function.
virtual std::string name() const =0
Get name of minimizer.
virtual double valAndDeriv(std::vector< double > &der) const =0
Calculate the value and the derivatives of the cost function.
std::shared_ptr< ICostFunction > ICostFunction_sptr
define a shared pointer to a cost function
Helper class which provides the Collimation Length for SANS instruments.