BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MinimizerResult.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/Kernel/MinimizerResult.h
6 //! @brief Defines class MinimizerResult.
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_KERNEL_MINIMIZERRESULT_H
16 #define BORNAGAIN_FIT_KERNEL_MINIMIZERRESULT_H
17 
18 #include "Fit/Kernel/Parameters.h"
19 #include <string>
20 
21 namespace Fit
22 {
23 
24 //! Result of minimization round.
25 
27 {
28 public:
30 
31  void setParameters(const Parameters& parameters);
32  Parameters parameters() const;
33 
34  void setMinValue(double value);
35  double minValue() const;
36 
37  std::string toString() const;
38 
39  void setReport(const std::string& value);
40 
41  void setDuration(double value);
42 
43  void setNumberOfCalls(int value);
44 
45  void setNumberOfGradientCalls(int value);
46 
47 private:
48  double m_min_value; //!< Found minimum of objective function.
49  int m_number_of_calls; //!< Number of objective function calls.
50  int m_number_of_gradient_calls; //!< Number of calls to calculate gradients
51  double m_duration; //!< Duration of minimization in sec.msec
52  std::string m_minimizer_report;
54 };
55 
56 } // namespace Fit
57 
58 #endif // BORNAGAIN_FIT_KERNEL_MINIMIZERRESULT_H
Defines class Parameters.
Result of minimization round.
int m_number_of_gradient_calls
Number of calls to calculate gradients.
int m_number_of_calls
Number of objective function calls.
double m_duration
Duration of minimization in sec.msec.
void setReport(const std::string &value)
void setMinValue(double value)
void setDuration(double value)
double m_min_value
Found minimum of objective function.
void setNumberOfGradientCalls(int value)
void setNumberOfCalls(int value)
double minValue() const
Minimum value of objective function found by minimizer.
std::string m_minimizer_report
std::string toString() const
Returns multi-line string representing minimization results.
void setParameters(const Parameters &parameters)
Parameters parameters() const
A collection of fit parameters.
Definition: Parameters.h:28
Objective function types.