BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RootScalarFunction.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/RootAdapter/RootScalarFunction.h
6 //! @brief Defines classes RootScalarFunction
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_ROOTSCALARFUNCTION_H
16 #define BORNAGAIN_FIT_ROOTADAPTER_ROOTSCALARFUNCTION_H
17 
18 #include "Fit/Kernel/KernelTypes.h"
19 
20 #ifdef _WIN32
21 #include <Math/Functor.h>
22 #else
23 #pragma GCC diagnostic push
24 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
25 #include <Math/Functor.h>
26 #pragma GCC diagnostic pop
27 #endif
28 
29 //! The chi2 function for use in minimizers.
30 //! @ingroup fitting_internal
31 
32 class RootScalarFunction : public ROOT::Math::Functor
33 {
34 public:
35  RootScalarFunction(root_scalar_t fcn, int ndims);
36 };
37 
38 #endif // BORNAGAIN_FIT_ROOTADAPTER_ROOTSCALARFUNCTION_H
Defines common types for fitting library.
std::function< double(const double *)> root_scalar_t
Definition: KernelTypes.h:33
The chi2 function for use in minimizers.
RootScalarFunction(root_scalar_t fcn, int ndims)