Mantid
Loading...
Searching...
No Matches
FitParameter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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 "MantidGeometry/DllConfig.h"
14
15namespace Mantid {
16namespace Geometry {
26class MANTID_GEOMETRY_DLL FitParameter {
27public:
29 FitParameter() : m_value(0.0), m_tie(""), m_function(""){};
30
32 double getValue(const double &at) const;
34 double getValue() const;
36 void setValue(double value) { m_value = value; }
38 const std::string &getTie() const { return m_tie; }
40 void setTie(const std::string &tie) { m_tie = tie; }
42 std::string getConstraint() const;
44 const std::string &getConstraintPenaltyFactor() const { return m_constraintPenaltyFactor; }
46 void setConstraintMin(const std::string &constraintMin) { m_constraintMin = constraintMin; }
48 void setConstraintMax(const std::string &constraintMax) { m_constraintMax = constraintMax; }
50 void setConstraintPenaltyFactor(const std::string &constraintPenaltyFactor) {
51 m_constraintPenaltyFactor = constraintPenaltyFactor;
52 }
54 const std::string &getFormula() const { return m_formula; }
56 void setFormula(const std::string &formula) { m_formula = formula; }
58 const std::string &getFormulaUnit() const { return m_formulaUnit; }
60 void setFormulaUnit(const std::string &formulaUnit) { m_formulaUnit = formulaUnit; }
62 const std::string &getResultUnit() const { return m_resultUnit; }
64 void setResultUnit(const std::string &resultUnit) { m_resultUnit = resultUnit; }
66 const std::string &getFunction() const { return m_function; }
68 void setFunction(const std::string &function) { m_function = function; }
70 const std::string &getName() const { return m_name; }
72 void setName(const std::string &name) { m_name = name; }
74 const Kernel::Interpolation &getLookUpTable() const { return m_lookUpTable; }
76 void setLookUpTable(const Kernel::Interpolation &lookupTable) { m_lookUpTable = lookupTable; }
77
79 void printSelf(std::ostream &os) const;
80
81private:
83 mutable double m_value;
85 std::string m_tie;
86 std::string m_constraintMin;
87 std::string m_constraintMax;
90 std::string m_function;
92 std::string m_name;
95
96 std::string m_formula;
97 std::string m_formulaUnit;
98 std::string m_resultUnit;
99};
100
101// defining operator << and >>
102MANTID_GEOMETRY_DLL std::ostream &operator<<(std::ostream &, const FitParameter &);
103MANTID_GEOMETRY_DLL std::istream &operator>>(std::istream &, FitParameter &);
104
105} // namespace Geometry
106} // namespace Mantid
const std::string & m_value
Definition: Algorithm.cpp:71
double value
The value of the point.
Definition: FitMW.cpp:51
Store information about a fitting parameter such as its value if it is constrained or tied.
Definition: FitParameter.h:26
void setName(const std::string &name)
set name
Definition: FitParameter.h:72
void setFormulaUnit(const std::string &formulaUnit)
set formula unit
Definition: FitParameter.h:60
const std::string & getTie() const
get tie
Definition: FitParameter.h:38
std::string m_tie
tie of parameter
Definition: FitParameter.h:85
void setResultUnit(const std::string &resultUnit)
set result formula unit
Definition: FitParameter.h:64
void setLookUpTable(const Kernel::Interpolation &lookupTable)
set look up table
Definition: FitParameter.h:76
const std::string & getName() const
get name
Definition: FitParameter.h:70
const std::string & getFormula() const
get formula
Definition: FitParameter.h:54
void setFormula(const std::string &formula)
set formula
Definition: FitParameter.h:56
const std::string & getFormulaUnit() const
get formula unit, and Empty string is no unit has been specified
Definition: FitParameter.h:58
void setTie(const std::string &tie)
set tie
Definition: FitParameter.h:40
Kernel::Interpolation m_lookUpTable
look up table
Definition: FitParameter.h:94
std::string m_constraintPenaltyFactor
the penalty factor
Definition: FitParameter.h:88
std::string m_constraintMin
constraint min boundary
Definition: FitParameter.h:86
void setConstraintMax(const std::string &constraintMax)
set constraint max
Definition: FitParameter.h:48
void setFunction(const std::string &function)
set function
Definition: FitParameter.h:68
void setConstraintMin(const std::string &constraintMin)
set constraint min
Definition: FitParameter.h:46
std::string m_formulaUnit
the unit that the formula expects
Definition: FitParameter.h:97
void setConstraintPenaltyFactor(const std::string &constraintPenaltyFactor)
set the constraint penalty
Definition: FitParameter.h:50
std::string m_name
name of parameter
Definition: FitParameter.h:92
void setValue(double value)
set parameter value
Definition: FitParameter.h:36
std::string m_formula
the formula
Definition: FitParameter.h:96
std::string m_function
name of fitting function
Definition: FitParameter.h:90
const Kernel::Interpolation & getLookUpTable() const
get look up table
Definition: FitParameter.h:74
const std::string & getFunction() const
get function
Definition: FitParameter.h:66
const std::string & getResultUnit() const
get result formula unit, and Empty string is no unit has been specified
Definition: FitParameter.h:62
std::string m_resultUnit
the result unit
Definition: FitParameter.h:98
double m_value
value of parameter
Definition: FitParameter.h:83
std::string m_constraintMax
constraint max boundary
Definition: FitParameter.h:87
const std::string & getConstraintPenaltyFactor() const
get penalty factor
Definition: FitParameter.h:44
Provide interpolation over a series of points.
Definition: Interpolation.h:29
MANTID_GEOMETRY_DLL std::istream & operator>>(std::istream &stream, SymmetryOperation &operation)
Reads identifier from stream and tries to parse as a symbol.
MANTID_GEOMETRY_DLL std::ostream & operator<<(std::ostream &stream, const PointGroup &self)
Returns a streamed representation of the PointGroup object.
Definition: PointGroup.cpp:312
Helper class which provides the Collimation Length for SANS instruments.