24 : m_owner(fun), m_function(fun), m_index(
index), m_isDefault(isDefault) {
51 size_t iLocal =
index;
94 const auto fLocal = cf->getFunction(iFun).get();
98 iLocal = fLocal->parameterIndex(cf->parameterLocalName(iLocal));
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
A composite function is a function containing other functions.
std::size_t functionIndex(const std::string &functionName) const
Get the first function index with a matching function name.
This is an interface to a fitting function - a semi-abstarct class.
virtual double getParameter(size_t i) const =0
Get i-th parameter.
virtual void setParameter(size_t, const double &value, bool explicitlySet=true)=0
Set i-th parameter.
virtual size_t getParameterIndex(const ParameterReference &ref) const =0
Return parameter index from a parameter reference.
virtual std::string parameterName(size_t i) const =0
Returns the name of parameter i.
virtual std::shared_ptr< IFunction > getFunction(size_t i) const
Returns the pointer to i-th child function.
virtual size_t parameterIndex(const std::string &name) const =0
Returns the index of parameter name.
ParameterReference()
Default constructor.
IFunction * ownerFunction() const
bool isDefault() const
Returns the default value flag.
double getParameter() const
Get the value of the parameter.
std::size_t getLocalIndex() const
Return parameter index in the local function.
bool isParameterOf(const IFunction *fun) const
Find out if this refers to a parameter of a function: direct or via composite function member.
IFunction * m_function
Function that together with m_index uniquely identify the parameter.
std::size_t parameterIndex() const
Return parameter index in the owning function.
void reset(IFunction *fun, std::size_t index, bool isDefault=false)
Reset the reference.
bool m_isDefault
Flag to mark as default the value of an object associated with this reference: a tie or a constraint.
void setParameter(const double &value, bool isExplicitlySet=true)
Set the parameter.
IFunction * m_owner
Function-owner of this reference.
std::string parameterName() const
Return parameter name in the owning function.
std::size_t m_index
Index of the parameter in m_function.
IFunction * getLocalFunction() const
Return pointer to the local function.