BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Base class to wrap Python callable and pass it to C++. More...
Public Types | |
enum | CallbackType { SCALAR , RESIDUAL } |
Public Member Functions | |
PyCallback (CallbackType callback_type=SCALAR) | |
virtual | ~PyCallback () |
virtual std::vector< double > | call_residuals (mumufit::Parameters pars) |
Call Python callable and returns its result. More... | |
virtual double | call_scalar (mumufit::Parameters pars) |
Call Python callable and returns its result. More... | |
CallbackType | callback_type () const |
Private Attributes | |
CallbackType | m_callback_type |
Base class to wrap Python callable and pass it to C++.
Used in swig interface file, intended to be overloaded from Python.
Definition at line 24 of file PyCallback.h.
PyCallback::PyCallback | ( | PyCallback::CallbackType | callback_type = SCALAR | ) |
Definition at line 17 of file PyCallback.cpp.
|
virtualdefault |
|
virtual |
Call Python callable and returns its result.
Intended to be overloaded in Python.
pars | Fit parameters object (intentionally passed by value). |
Definition at line 31 of file PyCallback.cpp.
Referenced by mumufit::Minimizer::minimize().
|
virtual |
Call Python callable and returns its result.
Intended to be overloaded in Python.
pars | Fit parameters object (intentionally passed by value). |
Definition at line 26 of file PyCallback.cpp.
Referenced by mumufit::Minimizer::minimize().
PyCallback::CallbackType PyCallback::callback_type | ( | ) | const |
Definition at line 19 of file PyCallback.cpp.
References m_callback_type.
Referenced by mumufit::Minimizer::minimize().
|
private |
Definition at line 44 of file PyCallback.h.
Referenced by callback_type().