Mantid
Loading...
Searching...
No Matches
Chebyshev.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#include <valarray>
14
15namespace Mantid {
16namespace CurveFitting {
17namespace Functions {
30class MANTID_CURVEFITTING_DLL Chebyshev : public BackgroundFunction {
31public:
33 Chebyshev();
34
36 std::string name() const override { return "Chebyshev"; }
37 const std::string category() const override { return "Background"; }
38 void function1D(double *out, const double *xValues, const size_t nData) const override;
39 void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override;
40
42 void setAttribute(const std::string &attName, const Attribute &) override;
43
44private:
46 int m_n;
48 double m_StartX;
50 double m_EndX;
52 mutable std::valarray<double> m_b;
53};
54
55using Chebyshev_sptr = std::shared_ptr<Chebyshev>;
56
57} // namespace Functions
58} // namespace CurveFitting
59} // namespace Mantid
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
Represents the Jacobian in IFitFunction::functionDeriv.
Definition: Jacobian.h:22
Implements Chebyshev polynomial expansion.
Definition: Chebyshev.h:30
double m_EndX
Upper x boundary. The default is 1.
Definition: Chebyshev.h:50
std::string name() const override
overwrite IFunction base class methods
Definition: Chebyshev.h:36
double m_StartX
Lower x boundary. The default is -1.
Definition: Chebyshev.h:48
std::valarray< double > m_b
Keep intermediate calculatons.
Definition: Chebyshev.h:52
const std::string category() const override
overwrite IFunction base class methods
Definition: Chebyshev.h:37
std::shared_ptr< Chebyshev > Chebyshev_sptr
Definition: Chebyshev.h:55
Helper class which provides the Collimation Length for SANS instruments.