BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Types.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Fit/Minimizer/Types.h
6 //! @brief Defines common types for fitting library.
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_MINIMIZER_TYPES_H
21 #define BORNAGAIN_FIT_MINIMIZER_TYPES_H
22 
23 #include <functional>
24 #include <vector>
25 
26 namespace mumufit {
27 class Parameters;
28 }
29 
30 using scalar_function_t = std::function<double(const std::vector<double>&)>;
31 
33  std::function<double(const std::vector<double>&, unsigned int, std::vector<double>&)>;
34 
35 using root_scalar_t = std::function<double(const double*)>;
36 
37 using root_gradient_t = std::function<double(const double*, unsigned int, double*)>;
38 
39 using fcn_scalar_t = std::function<double(const mumufit::Parameters&)>;
40 using fcn_residual_t = std::function<std::vector<double>(const mumufit::Parameters&)>;
41 
42 #endif // BORNAGAIN_FIT_MINIMIZER_TYPES_H
43 #endif // USER_API
std::function< double(const double *, unsigned int, double *)> root_gradient_t
Definition: Types.h:37
std::function< double(const std::vector< double > &)> scalar_function_t
Definition: Types.h:30
std::function< double(const mumufit::Parameters &)> fcn_scalar_t
Definition: Types.h:39
std::function< double(const double *)> root_scalar_t
Definition: Types.h:35
std::function< double(const std::vector< double > &, unsigned int, std::vector< double > &)> gradient_function_t
Definition: Types.h:33
std::function< std::vector< double >(const mumufit::Parameters &)> fcn_residual_t
Definition: Types.h:40
A collection of fit parameters.
Definition: Parameters.h:26
The multi-library, multi-algorithm fit wrapper library.