BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
PyFittingCallbacks.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Fitting/PyFittingCallbacks.h
6 //! @brief Defines family of PyFittingCallbacks classes.
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_SIM_FITTING_PYFITTINGCALLBACKS_H
16 #define BORNAGAIN_SIM_FITTING_PYFITTINGCALLBACKS_H
17 
18 //! Collection of wrapper classes to call Python callable from C++.
19 
20 #include "Fit/Param/Parameters.h"
21 
22 class ISimulation;
23 
24 //! Builds simulation object using a Python callable.
25 //! Base class to wrap Python callable and pass it to C++. Used in swig interface file,
26 //! intended to be overloaded from Python.
27 
29 public:
31  virtual ~PyBuilderCallback();
32 
33  virtual ISimulation* build_simulation(const mumufit::Parameters&) const;
34 };
35 
36 class FitObjective;
37 
38 //! Observer for FitObjective based on Python callable.
39 //! Base class to wrap Python callable and pass it to C++. Used in swig interface file,
40 //! intended to be overloaded from Python.
41 
43 public:
46 
47  virtual void update(const FitObjective&);
48 };
49 
50 #endif // BORNAGAIN_SIM_FITTING_PYFITTINGCALLBACKS_H
Defines class Parameters.
Holds vector of SimDataPairs (experimental data and simulation results) for use in fitting....
Definition: FitObjective.h:42
Abstract base class, holds the infrastructure to run a simulation.
Definition: ISimulation.h:42
Builds simulation object using a Python callable. Base class to wrap Python callable and pass it to C...
virtual ISimulation * build_simulation(const mumufit::Parameters &) const
virtual ~PyBuilderCallback()
Observer for FitObjective based on Python callable. Base class to wrap Python callable and pass it to...
virtual ~PyObserverCallback()
virtual void update(const FitObjective &)
A collection of fit parameters.
Definition: Parameters.h:26