Mantid
Loading...
Searching...
No Matches
LinearBackground.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
13
14namespace Mantid {
15namespace CurveFitting {
16namespace Functions {
30class MANTID_CURVEFITTING_DLL LinearBackground : public BackgroundFunction {
31public:
33 std::string name() const override { return "LinearBackground"; }
34 void function1D(double *out, const double *xValues, const size_t nData) const override;
35 void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override;
36
37 void fit(const std::vector<double> &X, const std::vector<double> &Y) override;
38
39protected:
41 void init() override;
43 void histogram1D(double *out, double left, const double *right, const size_t nBins) const override;
45 void histogramDerivative1D(API::Jacobian *jacobian, double left, const double *right,
46 const size_t nBins) const override;
47};
48
49} // namespace Functions
50} // namespace CurveFitting
51} // namespace Mantid
double left
Definition: LineProfile.cpp:80
double right
Definition: LineProfile.cpp:81
Represents the Jacobian in IFitFunction::functionDeriv.
Definition: Jacobian.h:22
Provide linear function interface to IFunction.
std::string name() const override
overwrite IFunction base class methods
Helper class which provides the Collimation Length for SANS instruments.