/
Resolution.cpp
47 lines (32 loc) · 1.72 KB
/
Resolution.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidCurveFitting/Functions/Resolution.h"
#include "MantidAPI/FunctionFactory.h"
namespace Mantid::CurveFitting::Functions {
using namespace CurveFitting;
using namespace Kernel;
using namespace API;
DECLARE_FUNCTION(Resolution)
Resolution::Resolution() : ParamFunction(), IFunction1D() {}
void Resolution::function1D(double *out, const double *xValues, const size_t nData) const {
m_fun.function1D(out, xValues, nData);
}
void Resolution::functionDeriv1D(Jacobian * /*jacobian*/, const double * /*xValues*/, const size_t /*nData*/) {
// do nothing: no fitting parameters
}
size_t Resolution::nAttributes() const { return m_fun.nAttributes(); }
std::vector<std::string> Resolution::getAttributeNames() const { return m_fun.getAttributeNames(); }
IFunction::Attribute Resolution::getAttribute(const std::string &attName) const { return m_fun.getAttribute(attName); }
void Resolution::setAttribute(const std::string &attName, const IFunction::Attribute &value) {
m_fun.setAttribute(attName, value);
}
bool Resolution::hasAttribute(const std::string &attName) const { return m_fun.hasAttribute(attName); }
std::string Resolution::attributeName(size_t index) const { return m_fun.attributeName(index); }
} // namespace Mantid::CurveFitting::Functions