BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParameterPlan.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/TestEngine/ParameterPlan.h
6 //! @brief Defines class ParameterPlan
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_FIT_TESTENGINE_PARAMETERPLAN_H
16 #define BORNAGAIN_FIT_TESTENGINE_PARAMETERPLAN_H
17 
18 #include "Fit/Kernel/Parameter.h"
19 
20 //! Defines initial settings of single fit parameter and the final value which has to be found
21 //! in the course of the fit.
22 
24 {
25 public:
26  ParameterPlan(const Fit::Parameter& param, double expected_value, double tolerance = 0.01)
27  : m_expected_value(expected_value), m_tolerance(tolerance), m_parameter(param)
28  {
29  }
30 
32  double expectedValue() const { return m_expected_value; }
33  double tolerance() const { return m_tolerance; }
34 
36 
37 private:
38  double m_expected_value; //!< expected value to find in the fit
39  double m_tolerance; //!< tolerance on found value wrt expected value
40  Fit::Parameter m_parameter; //!< initial parameter settings
41 };
42 
43 #endif // BORNAGAIN_FIT_TESTENGINE_PARAMETERPLAN_H
Defines class Parameter.
A fittable parameter with value, error, step, and limits.
Definition: Parameter.h:28
Defines initial settings of single fit parameter and the final value which has to be found in the cou...
Definition: ParameterPlan.h:24
Fit::Parameter m_parameter
initial parameter settings
Definition: ParameterPlan.h:40
void setTolerance(double tolerance)
Definition: ParameterPlan.h:35
double m_expected_value
expected value to find in the fit
Definition: ParameterPlan.h:38
double tolerance() const
Definition: ParameterPlan.h:33
double expectedValue() const
Definition: ParameterPlan.h:32
double m_tolerance
tolerance on found value wrt expected value
Definition: ParameterPlan.h:39
ParameterPlan(const Fit::Parameter &param, double expected_value, double tolerance=0.01)
Definition: ParameterPlan.h:26
Fit::Parameter fitParameter() const
Definition: ParameterPlan.h:31