BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
TestMinimizer.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/Minimizer/TestMinimizer.h
6 //! @brief Defines class TestMinimizer.
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_MINIMIZER_TESTMINIMIZER_H
16 #define BORNAGAIN_FIT_MINIMIZER_TESTMINIMIZER_H
17 
19 
20 //! A trivial minimizer that calls the objective function once. Used to test the whole chain.
21 
22 class TestMinimizer : public IMinimizer
23 {
24 public:
26  ~TestMinimizer() override;
27 
28  std::string minimizerName() const final;
29  std::string algorithmName() const final { return ""; }
30 
32 
33 private:
34  std::vector<double> m_parameter_values;
36 };
37 
38 #endif // BORNAGAIN_FIT_MINIMIZER_TESTMINIMIZER_H
Defines class IMinimizer.
std::function< double(const std::vector< double > &)> scalar_function_t
Definition: KernelTypes.h:28
std::function< double(const Fit::Parameters &)> fcn_scalar_t
Definition: KernelTypes.h:37
Result of minimization round.
A collection of fit parameters.
Definition: Parameters.h:28
Pure virtual interface for all kind minimizers.
Definition: IMinimizer.h:31
A trivial minimizer that calls the objective function once. Used to test the whole chain.
Definition: TestMinimizer.h:23
std::vector< double > m_parameter_values
Definition: TestMinimizer.h:34
scalar_function_t m_fcn
Definition: TestMinimizer.h:35
std::string minimizerName() const final
return name of the minimizer
~TestMinimizer() override
Fit::MinimizerResult minimize_scalar(fcn_scalar_t fcn, Fit::Parameters parameters) override
run minimization
std::string algorithmName() const final
return name of the minimization algorithm
Definition: TestMinimizer.h:29