16using namespace CurveFitting;
18using namespace Kernel;
25 declareParameter(
"Height", 1.0,
"Overall scaling factor");
26 declareParameter(
"Location", 1.0,
"Natural logarithm of the geometric mean");
27 declareParameter(
"Scale", 1.0,
"Natural logarithm of the geometric standard deviation");
41 for (
size_t i = 0; i < nData; i++) {
42 double x = xValues[i];
46 double c = (log(
x) - t) / b;
47 out[i] = h /
x * exp(-c * c / 2);
63 for (
size_t i = 0; i < nData; i++) {
64 double x = xValues[i];
71 double c = (log(
x) - t) / b;
72 double e = exp(-c * c / 2) /
x;
#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 Log Normal function: h*exp(-(log(x)-t)^2 / (2*b^2) )/x.
void function1D(double *out, const double *xValues, const size_t nData) const override
Function you want to fit to.
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
Derivatives of function with respect to active parameters.