#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 the index specified in the function set_oned_inte(). For n-
dimensional integration, n
one-dimensional integration objects should be specified, with indexes 0
through n-1
. The integration routines are called in order of their index, so that the outermost integration is done by the routine specified with index 0. The integral performed is:
This class is particularly useful if is time-consuming to evaluate, and separable from
.
See the discussion about the functions func
, lower
and upper
in the documentation for the class gen_inte.
No error estimate is performed. Error estimation for multiple dimension integrals is provided by the Monte Carlo integration classes (see mcarlo_inte).
Definition at line 75 of file comp_gen_inte.h.
Public Member Functions | |
int | set_oned_inte (inte< size_t > &it, size_t i) |
Set the one-dimensional integration object with index i . | |
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"). | |
Data Fields | |
size_t | max_dim |
The maxiumum number of integration dimensions (default 100). | |
Protected Member Functions | |
double | odfunc (double x, size_t &ix) |
The one-dimensional integration function. | |
Protected Attributes | |
alloc_vec_t * | cx |
The independent variable vector. | |
lfunc_t * | lowerp |
The function specifying the lower limits. | |
ufunc_t * | upperp |
The function specifying the upper limits. | |
func_t * | mf |
The function to be integrated. | |
size_t | ndim |
The number of dimensions. | |
param_t * | vp |
The user-specified parameter. | |
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 > , size_t > * | fmn |
The function to send to the integrators. | |
size_t | nint |
The size of the integration object arrays. | |
inte< size_t, funct< size_t > > ** | iptrs |
Pointers to the integration objects. | |
bool * | tptrs |
Flag indicating if integration object has been set. |
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page