composite_inte Class Template Reference

#include <composite_inte.h>

Inheritance diagram for composite_inte:

multi_inte

Detailed Description

template<class param_t, class func_t, class vec_t, class alloc_vec_t, class alloc_t>
class composite_inte< param_t, func_t, vec_t, alloc_vec_t, alloc_t >

Naive multi-dimensional integration over a hypercube.

Naively combine several one-dimensional integration objects from class inte in order to perform a multi-dimensional integration over a region defined by constant limits. For more general regions of integration, use children of the class gen_inte.

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]. In other words, the integral performed is:

\[ \int_{x_0=a_0}^{x_0=b_0} \int_{x_1=a_1}^{x_1=b_1} ... \int_{x_{\mathrm{n}-1}=a_{\mathrm{n}-1}}^ {x_{\mathrm{n}-1}=b_{\mathrm{n}-1}} f(x_0,x_1,...,x_{\mathrm{n}}) \]

No error estimate is performed.

Definition at line 63 of file composite_inte.h.


Public Member Functions

 composite_inte ()
virtual ~composite_inte ()
int set_ptrs (inte< od_parms, funct< od_parms > > **ip, int n)
 Designate the pointers to the integration routines.
virtual double minteg (func_t &func, size_t n, const vec_t &a, const vec_t &b, param_t &pa)
virtual const char * type ()
 Return string denoting type ("composite_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
< composite_inte
< param_t, func_t,
vec_t, alloc_vec_t,
alloc_t >, od_parms > * 
fmn
 This function to send to the integrators.
size_t ndim
 The number of dimensions.
inte< od_parms,
funct< od_parms > > ** 
iptrs
 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...

Member Function Documentation

int set_ptrs ( inte< od_parms, funct< od_parms > > **  ip,
int  n 
) [inline]

Designate the pointers to the integration routines.

This function allows duplicate objects in this list in order to allow the user to use only one object for more than one of the integrations.

If more 1-d integration routines than necessary are given, the extras will be unused.

Definition at line 115 of file composite_inte.h.


The documentation for this class was generated from the following file:
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.