17using namespace CurveFitting;
37 for (
size_t i = 0; i < nData; i++) {
51 for (
size_t i = 0; i < nData; i++) {
67 double cLeft = a0 *
left;
68 for (
size_t i = 0; i < nBins; ++i) {
69 double cRight = a0 *
right[i];
70 out[i] = cRight - cLeft;
82 const size_t nBins)
const {
85 for (
size_t i = 0; i < nBins; ++i) {
87 jacobian->
set(i, 0, xr - xl);
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
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.
void declareParameter(const std::string &name, double initValue=0, const std::string &description="") override
Declare a new parameter.
double getParameter(size_t i) const override
Get i-th parameter.
FlatBackground : TODO: DESCRIPTION.
void histogram1D(double *out, double left, const double *right, const size_t nBins) const override
Calculate histogram data.
void init() override
The only parameter is the constant for the flat background.
void histogramDerivative1D(API::Jacobian *jacobian, double left, const double *right, const size_t nBins) const override
Devivatives of the histogram.
void function1D(double *out, const double *xValues, const size_t nData) const override
Evaluate the function at the supplied points.
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
Evaluate the Jacobian at the supplied points.