#include <comp_gen_inte.h>
Naively combine several one-dimensional integration objects from class inte in order to perform a multi-dimensional integration. The integration routines are specified in the function set_ptrs().
The integration routines are called in order of their specification in the list inte **ip. For the example of a two-dimensional integration ip[0] is called first with limits a[0] and b[0] and performs the integral of the integral given by ip[1] of the function from a[1] to b[1], both of which may depend explicitly on x[0]. The integral performed is:
See the discussion about the functions func
, lower
and upper
in the documentation for the class gen_inte.
Definition at line 66 of file comp_gen_inte.h.
Public Member Functions | |
comp_gen_inte () | |
virtual | ~comp_gen_inte () |
int | set_ptrs (inte< od_parms, funct< od_parms > > **ip, int n) |
Designate the pointers to the integration routines. | |
virtual double | ginteg (func_t &func, size_t n, func_t &lower, func_t &upper, param_t &pa) |
Integrate function func from ![]() ![]() ![]() | |
virtual const char * | type () |
Return string denoting type ("comp_gen_inte"). | |
Protected Member Functions | |
double | odfunc (double x, od_parms &od) |
The one-dimensional integration function. | |
Protected Attributes | |
alloc_t | ao |
Memory allocator for objects of type alloc_vec_t . | |
funct_mfptr_noerr < comp_gen_inte < param_t, func_t, lfunc_t, ufunc_t, vec_t, alloc_vec_t, alloc_t >, od_parms > * | fmn |
The function to send to the integrators. | |
size_t | ndim |
The number of dimensions. | |
inte< od_parms, funct< od_parms > > ** | ptrs |
Pointers to the integration objects. | |
bool | ptrs_set |
True if the integration objects have been specified. | |
Data Structures | |
struct | od_parms |
Parameters to send to the 1-d integration functions. More... |
Designate the pointers to the integration routines.
The user can, in principle, specify the one instance of an inte object for several of the pointers, but this is discouraged as most inte objects cannot be used this way. This function will not warn you if some of the pointers specified in ip
refer to the same object.
If more 1-d integration routines than necessary are given, the extras will be unused.
Definition at line 123 of file comp_gen_inte.h.