BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IterationInfo.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Core/Fitting/IterationInfo.h
6 //! @brief Defines class IterationInfo.
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_CORE_FITTING_ITERATIONINFO_H
16 #define BORNAGAIN_CORE_FITTING_ITERATIONINFO_H
17 
18 #include "Fit/Kernel/Parameters.h"
19 #include <map>
20 #include <string>
21 
22 //! Stores fit iteration info to track fit flow from various observers.
23 //! Used in context of FitObjective.
24 
26 {
27 public:
28  IterationInfo();
29 
30  void update(const Fit::Parameters& params, double chi2);
31 
32  //! Returns current number of minimizer iterations.
33  unsigned iterationCount() const;
34 
35  double chi2() const;
36 
38 
39  //! Returns map of fit parameter names and its current values.
40  std::map<std::string, double> parameterMap() const;
41 
42 private:
43  double m_chi2;
46 };
47 
48 #endif // BORNAGAIN_CORE_FITTING_ITERATIONINFO_H
Defines class Parameters.
A collection of fit parameters.
Definition: Parameters.h:28
Stores fit iteration info to track fit flow from various observers.
Definition: IterationInfo.h:26
Fit::Parameters m_current_parameters
Definition: IterationInfo.h:44
std::map< std::string, double > parameterMap() const
Returns map of fit parameter names and its current values.
Fit::Parameters parameters() const
unsigned iterationCount() const
Returns current number of minimizer iterations.
void update(const Fit::Parameters &params, double chi2)
double chi2() const
unsigned m_iteration_count
Definition: IterationInfo.h:45