gsl_miser Class Template Reference

#include <gsl_miser.h>

Inheritance diagram for gsl_miser:

mcarlo_inte multi_inte

Detailed Description

template<class param_t, class func_t = multi_funct<param_t>, class rng_t = gsl_rnga, class vec_t = ovector_view, class alloc_vec_t = ovector, class alloc_t = ovector_alloc>
class gsl_miser< param_t, func_t, rng_t, vec_t, alloc_vec_t, alloc_t >

Multidimensional integration using Miser Miser Carlo (GSL).

Todo:
Document the fact that min_calls and min_calls_per_bi need to be set beforehand

Definition at line 47 of file gsl_miser.h.


Public Member Functions

virtual int allocate (size_t ldim)
 Allocate memory.
virtual int free ()
 Free allocated memory.
virtual int miser_minteg_err (func_t &func, size_t ndim, const vec_t &xl, const vec_t &xu, size_t calls, param_t &pa, double &res, double &err)
 Integrate function func from x=a to x=b.
virtual int minteg_err (func_t &func, size_t ndim, const vec_t &a, const vec_t &b, param_t &pa, double &res, double &err)
 Integrate function func from x=a to x=b.
virtual const char * type ()
 Return string denoting type ("gsl_miser").

Data Fields

double dither
 Introduce random variation into bisection (default 0.0).
double estimate_frac
 Specify fraction of function calls for estimating variance.
double alpha
 How estimated variances for two sub-regions are combined.
size_t min_calls
 Minimum number of calls to estimate the variance (default 100).
size_t min_calls_per_bisection
 Minimum number of calls required to proceed with bisection (default 4000).

Protected Member Functions

virtual int estimate_corrmc (func_t &func, size_t ndim, const vec_t &xl, const vec_t &xu, param_t &pa, size_t calls, double &res, double &err, const double lxmid[], double lsigma_l[], double lsigma_r[])
 Desc.

Protected Attributes

size_t dim
 Desc.
int estimate_style
 Desc.
int depth
 Desc.
int verbose
 Desc.
double * xmid
 Desc.
double * sigma_l
 Desc.
double * sigma_r
 Desc.
double * fmax_l
 Desc.
double * fmax_r
 Desc.
double * fmin_l
 Desc.
double * fmin_r
 Desc.
double * fsum_l
 Desc.
double * fsum_r
 Desc.
double * fsum2_l
 Desc.
double * fsum2_r
 Desc.
size_t * hits_l
 Desc.
size_t * hits_r
 Desc.
alloc_t ao
 Desc.
alloc_vec_t x
 Desc.

Field Documentation

double dither

Introduce random variation into bisection (default 0.0).

From GSL documentation:

	This parameter introduces a random fractional variation of size
	DITHER into each bisection, which can be used to break the
	symmetry of integrands which are concentrated near the exact
	center of the hypercubic integration region.  The default value of
	dither is zero, so no variation is introduced. If needed, a
	typical value of DITHER is 0.1.
	

Definition at line 65 of file gsl_miser.h.

double estimate_frac

Specify fraction of function calls for estimating variance.

From GSL documentation:

	This parameter specifies the fraction of the currently available
	number of function calls which are allocated to estimating the
	variance at each recursive step. The default value is 0.1.
	

Definition at line 77 of file gsl_miser.h.

double alpha

How estimated variances for two sub-regions are combined.

From GSL documentation:

	This parameter controls how the estimated variances for the two
	sub-regions of a bisection are combined when allocating points.
	With recursive sampling the overall variance should scale better
	than 1/N, since the values from the sub-regions will be obtained
	using a procedure which explicitly minimizes their variance.  To
	accommodate this behavior the MISER algorithm allows the total
	variance to depend on a scaling parameter \alpha,
	
	\Var(f) = {\sigma_a \over N_a^\alpha} + {\sigma_b \over N_b^\alpha}.
	
	The authors of the original paper describing MISER recommend the
	value \alpha = 2 as a good choice, obtained from numerical
	experiments, and this is used as the default value in this
	implementation.
	

Definition at line 100 of file gsl_miser.h.

size_t min_calls

Minimum number of calls to estimate the variance (default 100).

From GSL documentation:

	This parameter specifies the minimum number of function calls
	required for each estimate of the variance. If the number of
	function calls allocated to the estimate using ESTIMATE_FRAC falls
	below MIN_CALLS then MIN_CALLS are used instead.  This ensures
	that each estimate maintains a reasonable level of accuracy.  The
	default value of MIN_CALLS is `16 * dim'.
	

Definition at line 116 of file gsl_miser.h.

size_t min_calls_per_bisection

Minimum number of calls required to proceed with bisection (default 4000).

From GSL documentation:

	This parameter specifies the minimum number of function calls
	required to proceed with a bisection step.  When a recursive step
	has fewer calls available than MIN_CALLS_PER_BISECTION it performs
	a plain Monte Carlo estimate of the current sub-region and
	terminates its branch of the recursion.  The default value of this
	parameter is `32 * min_calls'.
	

Definition at line 132 of file gsl_miser.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