16using namespace CurveFitting;
18using namespace Kernel;
25 declareParameter(
"Height", 1.0,
"Height at time 0");
26 declareParameter(
"Lifetime", 1.0,
"Lifetime of the process");
33 for (
size_t i = 0; i < nData; i++) {
34 out[i] = h * exp(-(xValues[i]) / t);
42 for (
size_t i = 0; i < nData; i++) {
43 double x = xValues[i];
44 double e = exp(-
x / t);
46 out->
set(i, 1, h * e *
x / t / t);
#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(-(x-c)/t)
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.