BornAgain  1.19.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 reflection and scattering
4 //
5 //! @file Fit/Adapter/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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_FIT_ADAPTER_ROOTSCALARFUNCTION_H
21 #define BORNAGAIN_FIT_ADAPTER_ROOTSCALARFUNCTION_H
22 
23 #include "Fit/Minimizer/Types.h"
24 
25 #ifdef _WIN32
26 #include <Math/Functor.h>
27 #else
28 #pragma GCC diagnostic push
29 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
30 #include <Math/Functor.h>
31 #pragma GCC diagnostic pop
32 #endif
33 
34 //! The chi2 function for use in minimizers.
35 //! @ingroup fitting_internal
36 
37 class RootScalarFunction : public ROOT::Math::Functor {
38 public:
39  RootScalarFunction(root_scalar_t fcn, int ndims);
40 };
41 
42 #endif // BORNAGAIN_FIT_ADAPTER_ROOTSCALARFUNCTION_H
43 #endif // USER_API
Defines common types for fitting library.
std::function< double(const double *)> root_scalar_t
Definition: Types.h:35
The chi2 function for use in minimizers.
RootScalarFunction(root_scalar_t fcn, int ndims)