Mantid
Loading...
Searching...
No Matches
ParameterReference.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/DllConfig.h"
13#include <string>
14
15namespace Mantid {
16namespace API {
17class IFunction;
25class MANTID_API_DLL ParameterReference {
26public:
28 ParameterReference(IFunction *fun, std::size_t index, bool isDefault = false);
29 void setParameter(const double &value, bool isExplicitlySet = true);
30 double getParameter() const;
31 bool isDefault() const;
32 bool isParameterOf(const IFunction *fun) const;
33 virtual ~ParameterReference() = default;
34 IFunction *getLocalFunction() const;
35 std::size_t getLocalIndex() const;
36 std::size_t parameterIndex() const;
37 std::string parameterName() const;
38 IFunction *ownerFunction() const;
39
40protected:
41 void reset(IFunction *fun, std::size_t index, bool isDefault = false);
42
43private:
51 std::size_t m_index;
55};
56
57} // namespace API
58} // namespace Mantid
double value
The value of the point.
Definition: FitMW.cpp:51
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
This is an interface to a fitting function - a semi-abstarct class.
Definition: IFunction.h:163
A reference to a parameter in a function.
IFunction * m_function
Function that together with m_index uniquely identify the parameter.
bool m_isDefault
Flag to mark as default the value of an object associated with this reference: a tie or a constraint.
IFunction * m_owner
Function-owner of this reference.
std::size_t m_index
Index of the parameter in m_function.
virtual ~ParameterReference()=default
Helper class which provides the Collimation Length for SANS instruments.