12#include "MantidAPI/DllConfig.h"
17#pragma warning(disable : 4250)
27class MANTID_API_DLL TempFunction :
public virtual IFunction {
30 TempFunction(IFunctionMW *function);
33 virtual std::string name()
const {
return m_function->name(); }
36 virtual void setWorkspace(std::shared_ptr<const Workspace> ws) {
UNUSED_ARG(ws) }
46 virtual const std::string category()
const {
return m_function->category(); }
48 virtual void function(FunctionDomain &domain)
const;
49 virtual void functionDeriv(FunctionDomain &domain, Jacobian &jacobian);
52 virtual void setParameter(
size_t i,
const double &
value,
bool explicitlySet =
true) {
53 m_function->setParameter(i,
value, explicitlySet);
56 virtual void setParameterDescription(
size_t i,
const std::string &description) {
57 m_function->setParameterDescription(i, description);
60 virtual double getParameter(
size_t i)
const {
return m_function->getParameter(i); }
62 virtual void setParameter(
const std::string &name,
const double &
value,
bool explicitlySet =
true) {
63 m_function->setParameter(name,
value, explicitlySet);
66 virtual void setParameterDescription(
const std::string &name,
const std::string &description) {
67 m_function->setParameterDescription(name, description);
70 virtual double getParameter(
const std::string &name)
const {
return m_function->getParameter(name); }
72 virtual size_t nParams()
const {
return m_function->nParams(); }
74 virtual size_t parameterIndex(
const std::string &name)
const {
return m_function->parameterIndex(name); }
76 virtual std::string parameterName(
size_t i)
const {
return m_function->parameterName(i); }
78 virtual std::string parameterDescription(
size_t i)
const {
return m_function->parameterDescription(i); }
80 virtual bool isExplicitlySet(
size_t i)
const {
return m_function->isExplicitlySet(i); }
83 virtual size_t nActive()
const {
return m_function->nActive(); }
85 virtual size_t indexOfActive(
size_t i)
const {
return m_function->indexOfActive(i); }
87 virtual std::string nameOfActive(
size_t i)
const {
return m_function->nameOfActive(i); }
89 virtual std::string descriptionOfActive(
size_t i)
const {
return m_function->descriptionOfActive(i); }
92 virtual bool isActive(
size_t i)
const {
return m_function->isActive(i); }
94 virtual size_t activeIndex(
size_t i)
const {
return m_function->activeIndex(i); }
96 virtual void removeActive(
size_t i) { m_function->removeActive(i); }
98 virtual void restoreActive(
size_t i) { m_function->restoreActive(i); }
102 virtual size_t getParameterIndex(
const ParameterReference &ref)
const {
return m_function->getParameterIndex(ref); }
111 virtual IFunction *getContainingFunction(
const ParameterReference &ref)
const {
112 return m_function->getContainingFunction(ref);
115 virtual IFunction *getContainingFunction(
const IFunction *fun) {
return m_function->getContainingFunction(fun); }
118 virtual void applyTies() { m_function->applyTies(); }
120 virtual void clearTies() { m_function->clearTies(); }
122 virtual bool removeTie(
size_t i) {
return m_function->removeTie(i); }
123 virtual void removeTie(
const std::string &parName) { IFunction::removeTie(parName); }
125 virtual ParameterTie *getTie(
size_t i)
const {
return m_function->getTie(i); }
128 virtual void addConstraint(IConstraint *ic) { m_function->addConstraint(ic); }
130 virtual IConstraint *getConstraint(
size_t i)
const {
return m_function->getConstraint(i); }
132 virtual void removeConstraint(
const std::string &parName) { m_function->removeConstraint(parName); }
136 virtual void init() { m_function->init(); }
138 virtual void declareParameter(
const std::string &name,
double initValue = 0,
const std::string &description =
"") {
139 m_function->declareParameter(name, initValue, description);
142 virtual void addTie(ParameterTie *tie) { m_function->addTie(tie); }
145 IFunctionMW *m_function;
151class MANTID_API_DLL FunctionDomain1D :
public FunctionDomain {
153 FunctionDomain1D(
double start,
double end,
size_t n);
154 FunctionDomain1D(
const std::vector<double> &xvalues);
157 double getX(
size_t i)
const {
return m_X.at(i); }
160 std::vector<double> m_X;
161 friend class TempFunction;
double value
The value of the point.
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
Helper class which provides the Collimation Length for SANS instruments.