Integrates a function over a hyper-rectangle using a quasi-Monte Carlo method.
Required Arguments
FCN — User-supplied FUNCTION to be integrated. The form is FCN(X), where X− The independent variable. (Input) FCN− The value of the integrand at X. (Output)
FCN must be declared EXTERNAL in the calling program.
A — Vector containing lower limits of integration. (Input)
B — Vector containing upper limits of integration. (Input)
RESULT — The value of
is returned, where n is the dimension of X. If no value can be computed, then NaN is returned. (Output)
ERREST — Estimate of the absolute value of the error. (Output)
MAXEVALS — Number of evaluations allowed. (Input) Default: No limit.
BASE — The base of the Faure sequence. (Input) Default: The smallest prime number greater than or equal to the number of dimensions (length of a and b).
SKIP — The number of points to be skipped at the beginning of the Faure sequence. (Input) Default: , where and B is the largest representable integer.
FORTRAN 90 Interface
Generic: CALLQMC (FCN, A, B, RESULT[, …])
Specific: The specific interface names are S_QMC and D_QMC.
Description
Integration of functions over hyper rectangle by direct methods, such as QAND, is practical only for fairly low dimensional hypercubes. This is because the amount of work required increases exponentially as the dimension increases.
An alternative to direct methods is QMC, in which the integral is evaluated as the value of the function averaged over a sequence of randomly chosen points. Under mild assumptions on the function, this method will converge like
where k is the number of points at which the function is evaluated.
It is possible to improve on the performance of QMC by carefully choosing the points at which the function is to be evaluated. Randomly distributed points tend to be non-uniformly distributed. The alternative to a sequence of random points is a low-discrepancy sequence. A low-discrepancy sequence is one that is highly uniform.
This function is based on the low-discrepancy Faure sequence as computed by FAURE_NEXT, see the Fortran Stat Library, Chapter 18, “Random Number Generation”.