BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
KernelTypes.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/Kernel/KernelTypes.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 #ifndef BORNAGAIN_FIT_KERNEL_KERNELTYPES_H
16 #define BORNAGAIN_FIT_KERNEL_KERNELTYPES_H
17 
18 #include <functional>
19 #include <vector>
20 
21 //! Objective function types.
22 
23 namespace Fit
24 {
25 class Parameters;
26 }
27 
28 using scalar_function_t = std::function<double(const std::vector<double>&)>;
29 
31  std::function<double(const std::vector<double>&, unsigned int, std::vector<double>&)>;
32 
33 using root_scalar_t = std::function<double(const double*)>;
34 
35 using root_gradient_t = std::function<double(const double*, unsigned int, double*)>;
36 
37 using fcn_scalar_t = std::function<double(const Fit::Parameters&)>;
38 using fcn_residual_t = std::function<std::vector<double>(const Fit::Parameters&)>;
39 
40 #endif // BORNAGAIN_FIT_KERNEL_KERNELTYPES_H
std::function< double(const double *, unsigned int, double *)> root_gradient_t
Definition: KernelTypes.h:35
std::function< double(const std::vector< double > &)> scalar_function_t
Definition: KernelTypes.h:28
std::function< std::vector< double >(const Fit::Parameters &)> fcn_residual_t
Definition: KernelTypes.h:38
std::function< double(const double *)> root_scalar_t
Definition: KernelTypes.h:33
std::function< double(const Fit::Parameters &)> fcn_scalar_t
Definition: KernelTypes.h:37
std::function< double(const std::vector< double > &, unsigned int, std::vector< double > &)> gradient_function_t
Definition: KernelTypes.h:31
A collection of fit parameters.
Definition: Parameters.h:28
Objective function types.