Mantid
Loading...
Searching...
No Matches
FullprofPolynomial.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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
10#include "MantidKernel/System.h"
11
12namespace Mantid {
13namespace CurveFitting {
14namespace Functions {
15
18class MANTID_CURVEFITTING_DLL FullprofPolynomial : public BackgroundFunction {
19public:
21
23 std::string name() const override { return "FullprofPolynomial"; }
24
25 const std::string category() const override { return "Background"; }
26
27 void function1D(double *out, const double *xValues, const size_t nData) const override;
28
29 void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override;
30
31 // virtual void functionLocal(std::vector<double> &out, std::vector<double>
32 // xValues) const;
33
36 size_t nAttributes() const override { return 1; }
37
39 std::vector<std::string> getAttributeNames() const override;
40
42 Attribute getAttribute(const std::string &attName) const override;
43
45 void setAttribute(const std::string &attName, const Attribute &) override;
46
48 bool hasAttribute(const std::string &attName) const override;
49
50private:
52 int m_n;
53
55 double m_bkpos;
56};
57
58using FullprofPolynomial_sptr = std::shared_ptr<FullprofPolynomial>;
59
60} // namespace Functions
61} // namespace CurveFitting
62} // namespace Mantid
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
Represents the Jacobian in IFitFunction::functionDeriv.
Definition: Jacobian.h:22
FullprofPolynomial : Polynomial background defined in Fullprof.
size_t nAttributes() const override
Returns the number of attributes associated with the function (polynomial order n)
const std::string category() const override
overwrite IFunction base class methods
std::string name() const override
Overwrite IFunction base class.
std::shared_ptr< FullprofPolynomial > FullprofPolynomial_sptr
Helper class which provides the Collimation Length for SANS instruments.