gen_inte Class Template Reference

#include <gen_inte.h>

Inheritance diagram for gen_inte:

comp_gen_inte

Detailed Description

template<class param_t, class func_t, class lfunc_t, class ufunc_t, class vec_t = ovector_view>
class gen_inte< param_t, func_t, lfunc_t, ufunc_t, vec_t >

Generalized multi-dimensional integration base.

In order to allow the user to specify only three functions (for the integrand, the lower limits, and the upper limits) the first integer variable is used to distinguish among the variable limits. So the function $ a_0() $ is just lower(0,NULL,vp) where vp is a void pointer, the function $ a_1 $ is lower(1,x,vp) where x is a 1-dimensional vector, and the function $ a_i $ is lower(i,x,vp) where x is an i-dimensional vector. Similarly, the function $ b_i $ is upper(i,x,vp) where x is an i-dimensional vector.

Definition at line 44 of file gen_inte.h.


Public Member Functions

 gen_inte ()
double ginteg (func_t &func, size_t ndim, lfunc_t &a, ufunc_t &b, param_t &pa)
 Integrate function func from $ x_i=f_i(x_i) $ to $ x_i=g_i(x_i) $ for $ 0<i<\mathrm{ndim}-1 $.
int ginteg_err (func_t &func, size_t ndim, lfunc_t &a, ufunc_t &b, param_t &pa, double &res, double &err)
 Integrate function func from $ x_i=f_i(x_i) $ to $ x_i=g_i(x_i) $ for $ 0<i<\mathrm{ndim}-1 $.
double get_error ()
 Return the error in the result from the last call to ginteg() or ginteg_err().
const char * type ()
 Return string denoting type ("gen_inte").

Data Fields

int verbose
 Verbosity.
double tolf
 The maximum "uncertainty" in the value of the integral.

Protected Attributes

double interror
 The uncertainty for the last integration computation.

Member Function Documentation

double get_error (  )  [inline]

Return the error in the result from the last call to ginteg() or ginteg_err().

This will quietly return zero if no integrations have been performed.

Definition at line 92 of file gen_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.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page