BornAgain  1.19.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 reflection and scattering
4 //
5 //! @file Fit/Param/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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_FIT_PARAM_PARAMETERPLAN_H
21 #define BORNAGAIN_FIT_PARAM_PARAMETERPLAN_H
22 
23 #include "Fit/Param/Parameter.h"
24 
25 //! Defines initial settings of single fit parameter and the final value which has to be found
26 //! in the course of the fit.
27 
29 public:
30  ParameterPlan(const mumufit::Parameter& param, double expected_value, double tolerance = 0.01)
31  : m_expected_value(expected_value), m_tolerance(tolerance), m_parameter(param)
32  {
33  }
34 
36  double expectedValue() const { return m_expected_value; }
37  double tolerance() const { return m_tolerance; }
38 
40 
41 private:
42  double m_expected_value; //!< expected value to find in the fit
43  double m_tolerance; //!< tolerance on found value wrt expected value
44  mumufit::Parameter m_parameter; //!< initial parameter settings
45 };
46 
47 #endif // BORNAGAIN_FIT_PARAM_PARAMETERPLAN_H
48 #endif // USER_API
Defines class Parameter.
Defines initial settings of single fit parameter and the final value which has to be found in the cou...
Definition: ParameterPlan.h:28
void setTolerance(double tolerance)
Definition: ParameterPlan.h:39
double m_expected_value
expected value to find in the fit
Definition: ParameterPlan.h:42
double tolerance() const
Definition: ParameterPlan.h:37
double expectedValue() const
Definition: ParameterPlan.h:36
ParameterPlan(const mumufit::Parameter &param, double expected_value, double tolerance=0.01)
Definition: ParameterPlan.h:30
double m_tolerance
tolerance on found value wrt expected value
Definition: ParameterPlan.h:43
mumufit::Parameter m_parameter
initial parameter settings
Definition: ParameterPlan.h:44
mumufit::Parameter fitParameter() const
Definition: ParameterPlan.h:35
A fittable parameter with value, error, step, and limits.
Definition: Parameter.h:26