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
9#include "MantidCurveFitting/DllConfig.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 void function1D(double *out, const double *xValues, const size_t nData) const override;
26
27 void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override;
28
29 // virtual void functionLocal(std::vector<double> &out, std::vector<double>
30 // xValues) const;
31
34 size_t nAttributes() const override { return 1; }
35
37 std::vector<std::string> getAttributeNames() const override;
38
40 Attribute getAttribute(const std::string &attName) const override;
41
43 void setAttribute(const std::string &attName, const Attribute &) override;
44
46 bool hasAttribute(const std::string &attName) const override;
47
48private:
50 int m_n;
51
53 double m_bkpos;
54};
55
56using FullprofPolynomial_sptr = std::shared_ptr<FullprofPolynomial>;
57
58} // namespace Functions
59} // namespace CurveFitting
60} // namespace Mantid
Attribute is a non-fitting parameter.
Definition IFunction.h:285
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)
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.