![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Naive generalized multi-dimensional integration. More...
#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 73 of file comp_gen_inte.h.
Public Member Functions | |
int | set_oned_inte (inte< funct > &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) |
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. | |
alloc_t | ao |
Memory allocator for objects of type alloc_vec_t . | |
size_t | nint |
The size of the integration object arrays. | |
inte< funct > ** | iptrs |
Pointers to the integration objects. | |
bool * | tptrs |
Flag indicating if integration object has been set. |
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).