Mantid
Loading...
Searching...
No Matches
Resolution.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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//----------------------------------------------------------------------
8// Includes
9//----------------------------------------------------------------------
12
14
15using namespace CurveFitting;
16
17using namespace Kernel;
18
19using namespace API;
20
21DECLARE_FUNCTION(Resolution)
22
24
25void Resolution::function1D(double *out, const double *xValues, const size_t nData) const {
26 m_fun.function1D(out, xValues, nData);
27}
28
29void Resolution::functionDeriv1D(Jacobian * /*jacobian*/, const double * /*xValues*/, const size_t /*nData*/) {
30 // do nothing: no fitting parameters
31}
32
33size_t Resolution::nAttributes() const { return m_fun.nAttributes(); }
34
35std::vector<std::string> Resolution::getAttributeNames() const { return m_fun.getAttributeNames(); }
36
37IFunction::Attribute Resolution::getAttribute(const std::string &attName) const { return m_fun.getAttribute(attName); }
38
39void Resolution::setAttribute(const std::string &attName, const IFunction::Attribute &value) {
40 m_fun.setAttribute(attName, value);
41}
42
43bool Resolution::hasAttribute(const std::string &attName) const { return m_fun.hasAttribute(attName); }
44
45std::string Resolution::attributeName(size_t index) const { return m_fun.attributeName(index); }
46
47} // namespace Mantid::CurveFitting::Functions
double value
The value of the point.
Definition: FitMW.cpp:51
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
This is a specialization of IFunction for functions of one real argument.
Definition: IFunction1D.h:43
Attribute is a non-fitting parameter.
Definition: IFunction.h:282
virtual std::string attributeName(size_t index) const
Get name of ith attribute.
Definition: IFunction.cpp:1382
virtual bool hasAttribute(const std::string &name) const
Check if attribute attName exists.
Definition: IFunction.cpp:1339
Represents the Jacobian in IFitFunction::functionDeriv.
Definition: Jacobian.h:22
Implements the part of IFunction interface dealing with parameters.
Definition: ParamFunction.h:33
bool hasAttribute(const std::string &attName) const override
Check if attribute attName exists.
Definition: Resolution.cpp:43
TabulatedFunction m_fun
Function that does the actual job.
Definition: Resolution.h:53
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
function derivatives
Definition: Resolution.cpp:29
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names.
Definition: Resolution.cpp:35
Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName.
Definition: Resolution.cpp:37
std::string attributeName(size_t index) const override
Get name of ith attribute.
Definition: Resolution.cpp:45
size_t nAttributes() const override
Returns the number of attributes associated with the function.
Definition: Resolution.cpp:33
void function1D(double *out, const double *xValues, const size_t nData) const override
Function values.
Definition: Resolution.cpp:25
void setAttribute(const std::string &attName, const Attribute &) override
Set a value to attribute attName.
Definition: Resolution.cpp:39
size_t nAttributes() const override
Returns the number of attributes associated with the function.
void function1D(double *out, const double *xValues, const size_t nData) const override
Calculate the function values.
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names.
void setAttribute(const std::string &attName, const IFunction::Attribute &value) override
Set a value to attribute attName.
Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName.