12#include "MantidAPI/DllConfig.h"
39 void setParameter(
size_t,
const double &
value,
bool explicitlySet =
true)
override;
41 void setParameterDescription(
size_t,
const std::string &description)
override;
43 double getParameter(
size_t i)
const override;
45 void setParameter(
const std::string &name,
const double &
value,
bool explicitlySet =
true)
override;
47 void setParameterDescription(
const std::string &name,
const std::string &description)
override;
49 double getParameter(
const std::string &name)
const override;
51 bool hasParameter(
const std::string &name)
const override;
53 size_t nParams()
const override {
return m_parameters.size(); }
55 size_t parameterIndex(
const std::string &name)
const override;
57 std::string parameterName(
size_t i)
const override;
59 std::string parameterDescription(
size_t i)
const override;
61 bool isExplicitlySet(
size_t i)
const override;
63 double getError(
size_t i)
const override;
65 double getError(
const std::string &name)
const override;
67 void setError(
size_t i,
double err)
override;
69 void setError(
const std::string &name,
double err)
override;
81 void declareParameter(
const std::string &name,
double initValue = 0,
const std::string &description =
"")
override;
83 virtual double *getParameterAddress(
size_t i);
85 void clearAllParameters();
96 throw std::out_of_range(
"ParamFunction parameter index " +
std::to_string(i) +
" out of range " +
double value
The value of the point.
This is an interface to a fitting function - a semi-abstarct class.
ParameterStatus
Describe parameter status in relation to fitting: Active: Fit varies such parameter directly.
Implements the part of IFunction interface dealing with parameters.
std::vector< std::string > m_parameterDescriptions
parameter descriptions
std::vector< double > m_parameters
Keeps parameter values.
std::vector< std::string > m_parameterNames
Keeps parameter names.
std::vector< double > m_errors
Keeps parameter errors.
ParamFunction()
Default constructor.
std::vector< ParameterStatus > m_parameterStatus
Keeps status for each parameter.
IFunction_sptr getContainingFunction(const ParameterReference &ref) const
Get the containing function.
std::vector< bool > m_explicitlySet
Flags of explicitly set parameters.
size_t nParams() const override
Total number of parameters.
void checkParameterIndex(size_t i) const
Check that a parameter index is in a valid range.
IFunction_sptr getContainingFunction(IFunction_sptr fun)
Get the containing function.
A reference to a parameter in a function.
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Helper class which provides the Collimation Length for SANS instruments.
std::string to_string(const wide_integer< Bits, Signed > &n)