BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimAnMinimizer.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/RootAdapter/SimAnMinimizer.h
6 //! @brief Declares class SimAnMinimizer.
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_ROOTADAPTER_SIMANMINIMIZER_H
16 #define BORNAGAIN_FIT_ROOTADAPTER_SIMANMINIMIZER_H
17 
19 
20 namespace ROOT
21 {
22 namespace Math
23 {
24 class GSLSimAnMinimizer;
25 }
26 } // namespace ROOT
27 
28 //! Wrapper for the CERN ROOT facade of the GSL simmulated annealing minimizer.
29 //! @ingroup fitting_internal
30 
32 {
33 public:
35  ~SimAnMinimizer() override;
36 
37  //! Sets minimizer internal print level.
38  //! Default value is 0 (silent).
39  void setPrintLevel(int value);
40  int printLevel() const;
41 
42  //! Sets maximum number of iterations to try at each step.
43  void setMaxIterations(int value);
44  int maxIterations() const;
45 
46  //! Sets number of iterations at each temperature.
47  void setIterationsAtEachTemp(int value);
48  int iterationsAtEachTemp() const;
49 
50  //! Sets max step size used in random walk.
51  void setStepSize(double value);
52  double stepSize() const;
53 
54  //! Sets Boltzmann distribution parameter: k.
55  void setBoltzmannK(double value);
56  double boltzmannK() const;
57 
58  //! Sets Boltzmann distribution parameter: initial temperature.
59  void setBoltzmannInitialTemp(double value);
60  double boltzmannInitialTemp() const;
61 
62  //! Sets Boltzmann distribution parameter: mu.
63  void setBoltzmannMu(double value);
64  double boltzmannMu() const;
65 
66  //! Sets Boltzmann distribution parameter: minimal temperature.
67  void setBoltzmannMinTemp(double value);
68  double boltzmannMinTemp() const;
69 
70  std::map<std::string, std::string> statusMap() const override;
71 
72 protected:
73  void propagateOptions() override;
74  const root_minimizer_t* rootMinimizer() const override;
75 
76 private:
77  std::unique_ptr<ROOT::Math::GSLSimAnMinimizer> m_siman_minimizer;
78 };
79 
80 #endif // BORNAGAIN_FIT_ROOTADAPTER_SIMANMINIMIZER_H
Declares class RootMinimizerAdapter.
Pure virtual interface that adapts the CERN ROOT minimizer to our IMinimizer.
ROOT::Math::Minimizer root_minimizer_t
Wrapper for the CERN ROOT facade of the GSL simmulated annealing minimizer.
std::map< std::string, std::string > statusMap() const override
Returns map of string representing different minimizer statuses.
void setIterationsAtEachTemp(int value)
Sets number of iterations at each temperature.
void setPrintLevel(int value)
Sets minimizer internal print level.
int iterationsAtEachTemp() const
double boltzmannMinTemp() const
int maxIterations() const
void setBoltzmannMu(double value)
Sets Boltzmann distribution parameter: mu.
double stepSize() const
void setBoltzmannK(double value)
Sets Boltzmann distribution parameter: k.
void propagateOptions() override
int printLevel() const
~SimAnMinimizer() override
std::unique_ptr< ROOT::Math::GSLSimAnMinimizer > m_siman_minimizer
void setStepSize(double value)
Sets max step size used in random walk.
const root_minimizer_t * rootMinimizer() const override
void setBoltzmannMinTemp(double value)
Sets Boltzmann distribution parameter: minimal temperature.
double boltzmannK() const
void setMaxIterations(int value)
Sets maximum number of iterations to try at each step.
double boltzmannInitialTemp() const
void setBoltzmannInitialTemp(double value)
Sets Boltzmann distribution parameter: initial temperature.
double boltzmannMu() const