31 throw std::runtime_error(
"Cloned function is not of type FunctionParameterDecorator, aborting.");
37 cloned->setDecoratedFunctionPrivate(decoratedFn->clone());
50 double startX,
double endX) {
276 throw std::runtime_error(
"No wrapped function set, aborting.");
282 const std::string &description) {
double value
The value of the point.
IPeaksWorkspace_sptr workspace
std::map< DeltaEMode::Type, std::string > index
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
double activeParameter(size_t i) const override
Value of i-th active parameter of the decorated function.
bool hasParameter(const std::string &name) const override
Check if the decorated function has a parameter with this name.
void setDecoratedFunction(const std::string &wrappedFunctionName)
IFunction_sptr clone() const override
Virtual copy constructor.
ParameterStatus getParameterStatus(size_t i) const override
Get status of parameter.
void addTie(std::unique_ptr< ParameterTie >) override
Forwads addTie-call to the decorated function.
void removeConstraint(const std::string &parName) override
Remove a constraint of decorated function.
void setMatrixWorkspace(std::shared_ptr< const MatrixWorkspace > workspace, size_t wi, double startX, double endX) override
Set matrix workspace.
IFunction_sptr m_wrappedFunction
void setAttribute(const std::string &attName, const IFunction::Attribute &attValue) override
Set a value to attribute attName of decorated function.
void throwIfNoFunctionSet() const
Throws std::runtime_error when m_wrappedFunction is not set.
void setActiveParameter(size_t i, double value) override
Set new value of i-th active parameter of the decorated function.
void removeTie(const std::string &parName) override
Removes the tie off a parameter.
ParameterTie * getTie(size_t i) const override
Get the tie of i-th parameter of decorated function.
size_t nAttributes() const override
Returns the number of attributes associated with the decorated function.
void setUpForFit() override
Set parameters of decorated function to satisfy constraints.
std::string parameterName(size_t i) const override
Returns the name of parameter i of decorated function.
void setParameterStatus(size_t i, ParameterStatus status) override
Change status of parameter.
bool hasAttribute(const std::string &attName) const override
Check if attribute attName exists in decorated function.
virtual void beforeDecoratedFunctionSet(const IFunction_sptr &fn)
Function that is called before the decorated function is set.
void setDecoratedFunctionPrivate(const IFunction_sptr &fn)
size_t parameterIndex(const std::string &name) const override
Returns the index of parameter of decorated function name.
std::string parameterDescription(size_t i) const override
Returns the description of parameter i of decorated function.
size_t nParams() const override
Total number of parameters of decorated function.
IFunction_sptr getDecoratedFunction() const
void setParameterDescription(size_t i, const std::string &description) override
Set i-th parameter description of decorated function.
void declareParameter(const std::string &name, double initValue, const std::string &description) override
Does nothing, function does not have parameters.
void tie(const std::string &parName, const std::string &expr, bool isDefault=false) override
Tie a parameter of decorated function to other parameters (or a constant).
void setParameter(size_t i, const double &value, bool explicitlySet=true) override
Set i-th parameter of decorated function.
void addConstraint(std::unique_ptr< IConstraint > ic) override
Add a constraint to decorated function.
bool isExplicitlySet(size_t i) const override
Checks if a parameter of decorated function has been set explicitly.
double getParameter(size_t i) const override
Get i-th parameter of decorated function.
void setError(size_t i, double err) override
Set the fitting error for a parameter of decorated function.
void setWorkspace(std::shared_ptr< const Workspace > ws) override
Set the workspace.
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names of decorated function.
IConstraint * getConstraint(size_t i) const override
Get constraint of i-th parameter of decorated function.
double getError(size_t i) const override
Get the fitting error for a parameter of decorated function.
IFunction::Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName of decorated function-.
size_t getParameterIndex(const ParameterReference &ref) const override
Return parameter index of decorated function from a parameter reference.
void clearTies() override
Remove all ties of decorated function.
void applyTies() override
Apply the ties in decorated function.
An interface to a constraint.
Attribute is a non-fitting parameter.
ParameterStatus
Describe parameter status in relation to fitting: Active: Fit varies such parameter directly.
virtual std::string name() const =0
Returns the function's name.
A reference to a parameter in a function.
std::size_t getLocalIndex() const
Return parameter index in the local function.
IFunction * getLocalFunction() const
Return pointer to the local function.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< FunctionParameterDecorator > FunctionParameterDecorator_sptr
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class