BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Classes | |
struct | CallBackHolder |
Public Member Functions | |
IntegratorMCMiser (const T *p_object, miser_integrand< T > p_member_function, size_t dim) | |
~IntegratorMCMiser () | |
double | integrate (double *min_array, double *max_array, void *params, size_t nbr_points) |
Static Private Member Functions | |
static double | StaticCallBack (double *d_array, size_t dim, void *v) |
Private Attributes | |
const T * | mp_object |
miser_integrand< T > | m_member_function |
size_t | m_dim |
gsl_monte_miser_state * | m_gsl_workspace |
gsl_rng * | m_random_gen |
Template class to use Monte Carlo MISER integration of class member functions.
Wraps an integrator from GNU Scientific Library. Since this class holds a persistent workspace, we need at least one instance per thread. Standard usage for integration inside a class T:
Definition at line 34 of file IntegratorMCMiser.h.
IntegratorMCMiser< T >::IntegratorMCMiser | ( | const T * | p_object, |
miser_integrand< T > | p_member_function, | ||
size_t | dim | ||
) |
to integrate p_member_function, which must belong to p_object
Definition at line 85 of file IntegratorMCMiser.h.
References IntegratorMCMiser< T >::m_dim, IntegratorMCMiser< T >::m_gsl_workspace, and IntegratorMCMiser< T >::m_random_gen.
IntegratorMCMiser< T >::~IntegratorMCMiser |
Definition at line 98 of file IntegratorMCMiser.h.
double IntegratorMCMiser< T >::integrate | ( | double * | min_array, |
double * | max_array, | ||
void * | params, | ||
size_t | nbr_points | ||
) |
perform the actual integration over the ranges [min_array, max_array]
Definition at line 105 of file IntegratorMCMiser.h.
|
inlinestaticprivate |
static function that can be passed to gsl integrator
Definition at line 53 of file IntegratorMCMiser.h.
References IntegratorMCMiser< T >::CallBackHolder::m_data, IntegratorMCMiser< T >::CallBackHolder::m_member_function, and IntegratorMCMiser< T >::CallBackHolder::m_object_pointer.
|
private |
Definition at line 59 of file IntegratorMCMiser.h.
|
private |
Definition at line 60 of file IntegratorMCMiser.h.
|
private |
dimension of the integration
Definition at line 61 of file IntegratorMCMiser.h.
Referenced by IntegratorMCMiser< T >::IntegratorMCMiser().
|
private |
Definition at line 62 of file IntegratorMCMiser.h.
Referenced by IntegratorMCMiser< T >::IntegratorMCMiser().
|
private |
Definition at line 63 of file IntegratorMCMiser.h.
Referenced by IntegratorMCMiser< T >::IntegratorMCMiser().