16using namespace CurveFitting;
18using namespace Kernel;
25 declareParameter(
"A", 0.2,
"Amplitude at time 0");
26 declareParameter(
"Lambda", 0.2,
"Decay rate");
33 for (
size_t i = 0; i < nData; i++) {
34 out[i] = gA0 * exp(-gs * (xValues[i]));
42 for (
size_t i = 0; i < nData; i++) {
43 double x = xValues[i];
44 double e = exp(-gs *
x);
46 out->
set(i, 1, -gA0 *
x * e);
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
Represents the Jacobian in IFitFunction::functionDeriv.
virtual void set(size_t iY, size_t iP, double value)=0
Set a value to a Jacobian matrix element.
double getParameter(size_t i) const override
Get i-th parameter.
Provide exponential decay function: h*exp(-lambda.x)
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
Derivatives of function with respect to active parameters.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.