test_nint
test_nint,
a FORTRAN90 code which
defines test problems for the approximate computation of integrals
over multi-dimensional regions.
Routines are available to evaluate the integrand, return the exact
value of the integral, report the name of the problem,
report the integration limits, get, set or modify a base point.
The integrands is assigned an index. The integrands can be invoked
by index. Most integrands may be defined for any value of the
spatial dimension, which we denote here by m. Most integrands
are defined on the unit m-dimensional hypercube. Some
integrands include one or more parameters. These generally have
default values, which can be altered by the user.
For each problem, a set of routines are available with a standard
interface, for manipulating and evaluating the problem. For a
problem with index "87", for instance, we might have the following
set of routines. The most important is P87_F which evaluates
the integrand. We probably also need P87_LIM to determine
the limits of integration, and P87_EXACT to get the exact
value of the integral (if known). A number of routines are available
to set, get, or randomize parameters associated with the problem.
-
P87_DEFAULT sets default values for problem 87.
-
P87_EXACT returns the exact integral for problem 87.
-
P87_F evaluates the integrand for problem 87.
-
P87_I4 sets or gets integer scalar parameters for problem 87.
-
P87_I4VEC sets or gets integer vector parameters for problem 87.
-
P87_LIM returns the integration limits for problem 87.
-
P87_NAME returns the name of problem 87.
-
P87_R8 sets or gets real scalar parameters for problem 87.
-
P87_R8VEC sets or gets real vector parameters for problem 87.
-
P87_REGION returns the name of the integration region
for problem 87.
-
P87_TITLE prints a title for problem 87.
The list of integrand functions includes:
-
f(x) = ( sum ( x(1:m) ) )^2;
-
f(x) = ( sum ( 2 * x(1:m) - 1 ) )^4;
-
f(x) = ( sum ( x(1:m) ) )^5;
-
f(x) = ( sum ( 2 * x(1:m) - 1 ) )^6;
-
f(x) = 1 / ( 1 + sum ( 2 * x(1:m) ) );
-
f(x) = product ( 2 * abs ( 2 * x(1:m) - 1 ) );
-
f(x) = product ( pi / 2 ) * sin ( pi * x(1:m) );
-
f(x) = ( sin ( (pi/4) * sum ( x(1:m) ) ) )^2;
-
f(x) = exp ( sum ( c(1:m) * x(1:m) ) );
-
f(x) = sum ( abs ( x(1:m) - 0.5 ) );
-
f(x) = exp ( sum ( abs ( 2 * x(1:m) - 1 ) ) );
-
f(x) = product ( 1 <= i <= m ) ( i * cos ( i * x(i) ) );
-
f(x) = product ( 1 <= i <= m ) t(n(i))(x(i)), t(n(i))
is a Chebyshev polynomial;
-
f(x) = sum ( 1 <= i <= m ) (-1)^i * product ( 1 <= j <= i ) x(j);
-
f(x) = product ( 1 <= i <= order ) x(mod(i-1,m)+1);
-
f(x) = sum ( abs ( x(1:m) - x0(1:m) ) );
-
f(x) = sum ( ( x(1:m) - x0(1:m) )^2 );
-
f(x) = 1 inside an m-dimensional sphere around x0(1:m), 0 outside;
-
f(x) = product ( sqrt ( abs ( x(1:m) - x0(1:m) ) ) );
-
f(x) = ( sum ( x(1:m) ) ^power;
-
f(x) = c * product ( x(1:m)^e(1:m) ) on the surface of
an m-dimensional unit sphere;
-
f(x) = c * product ( x(1:m)^e(1:m) ) in an m-dimensional ball;
-
f(x) = c * product ( x(1:m)^e(1:m) ) in the unit m-dimensional simplex;
-
f(x) = product ( abs ( 4 * x(1:m) - 2 ) + c(1:m) )
/ ( 1 + c(1:m) ) );
-
f(x) = exp ( c * product ( x(1:m) ) );
-
f(x) = product ( c(1:m) * exp ( - c(1:m) * x(1:m) ) );
-
f(x) = cos ( 2 * pi * r + sum ( c(1:m) * x(1:m) ) ),
Genz "Oscillatory";
-
f(x) = 1 / product ( c(1:m)^2 + (x(1:m) - x0(1:m))^2),
Genz "Product Peak";
-
f(x) = 1 / ( 1 + sum ( c(1:m) * x(1:m) ) )^(m+r),
Genz "Corner Peak";
-
f(x) = exp(-sum(c(1:m)^2 * ( x(1:m) - x0(1:m))^2 ) ),
Genz "Gaussian";
-
f(x) = exp ( - sum ( c(1:m) * abs ( x(1:m) - x0(1:m) ) ) ),
Genz "Continuous";
-
f(x) = exp(sum(c(1:m)*x(1:m)) for x(1:m) <= x0(1:m), 0 otherwise,
Genz "Discontinuous";
-
f(x) = sum ( x(1:n)^2 )
Ball R^2;
An Important Quote:
"When good results are obtained in integrating a high-dimensional
function, we should conclude first of all that an especially tractable
integrand was tried and not that a generally successful method has
been found. A secondary conclusion is that we might have made a
very good choice in selecting an integration method to exploit whatever
features of f made it tractable."
Art Owen,
Latin Supercube Sampling for Very High Dimensional Simulation,
ACM Transactions on Modeling and Computer Simulations,
Volume 8, Number 1, January 1998, pages 71-102.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
test_nint is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
BALL_VOLUME_MONTE_CARLO,
a FORTRAN90 code which
applies a Monte Carlo method to estimate the volume of the unit 6D ball;
CUBPACK,
a FORTRAN90 code which
estimates the integral of a function over a collection of N-dimensional
hyperrectangles and simplices.
INTEGRAL_TEST,
a FORTRAN90 code which
tests the suitability of a set of N points for use in an equal-weight quadrature rule over
the multi-dimensional unit hypercube.
NINT_EXACTNESS,
a FORTRAN90 code which
measures the polynomial exactness of a multidimensional quadrature rule.
NINTLIB,
a FORTRAN90 code which
estimates integrals over multidimensional regions.
PRODUCT_RULE,
a FORTRAN90 code which
constructs a product quadrature rule from 1D factor rules.
QUADRATURE_TEST,
a FORTRAN90 code which
reads files defining a quadrature rule, and
applies them to all the test integrals defined by TEST_NINT.
STROUD,
a FORTRAN90 code which
defines quadrature rules for a variety of multidimensional reqions.
TEST_INT_2D,
a FORTRAN90 code which
defines test integrands for 2D quadrature rules.
test_nint_test
TESTPACK,
a FORTRAN90 code which
defines a set of integrands used to test multidimensional quadrature.
Reference:
-
JD Beasley, SG Springer,
Algorithm AS 111:
The Percentage Points of the Normal Distribution,
Applied Statistics,
Volume 26, 1977, pages 118-121.
-
Paul Bratley, Bennett Fox, Harald Niederreiter,
Implementation and Tests of Low-Discrepancy Sequences,
ACM Transactions on Modeling and Computer Simulation,
Volume 2, Number 3, July 1992, pages 195-213.
-
Roger Broucke,
Algorithm 446:
Ten Subroutines for the Manipulation of Chebyshev Series,
Communications of the ACM,
Volume 16, 1973, pages 254-256.
-
William Cody, Kenneth Hillstrom,
Chebyshev Approximations for the Natural Logarithm of the
Gamma Function,
Mathematics of Computation,
Volume 21, Number 98, April 1967, pages 198-203.
-
Richard Crandall,
Projects in Scientific Computing,
Springer, 2005,
ISBN: 0387950095,
LC: Q183.9.C733.
-
Philip Davis, Philip Rabinowitz,
Methods of Numerical Integration,
Second Edition,
Dover, 2007,
ISBN: 0486453391,
LC: QA299.3.D28.
-
Gerald Folland,
How to Integrate a Polynomial Over a Sphere,
American Mathematical Monthly,
Volume 108, Number 5, May 2001, pages 446-448.
-
Leslie Fox, Ian Parker,
Chebyshev Polynomials in Numerical Analysis,
Oxford Press, 1968,
LC: QA297.F65.
-
Alan Genz,
Testing Multidimensional Integration Routines,
in Tools, Methods, and Languages for Scientific and
Engineering Computation,
edited by B Ford, JC Rault, F Thomasset,
North-Holland, 1984, pages 81-94,
ISBN: 0444875700,
LC: Q183.9.I53.
-
Alan Genz,
A Package for Testing Multiple Integration Subroutines,
in Numerical Integration:
Recent Developments, Software and Applications,
edited by Patrick Keast, Graeme Fairweather,
Reidel, 1987, pages 337-340,
ISBN: 9027725144,
LC: QA299.3.N38.
-
Kenneth Hanson,
Quasi-Monte Carlo: halftoning in high dimensions?
in Computatinal Imaging,
Edited by CA Bouman, RL Stevenson,
Proceedings SPIE,
Volume 5016, 2003, pages 161-172.
-
John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thatcher,
Christoph Witzgall,
Computer Approximations,
Wiley, 1968,
LC: QA297.C64.
-
Claude Itzykson, Jean-Michel Drouffe,
Statistical Field Theory,
Volume 1,
Cambridge, 1991,
ISBN: 0-521-40806-7,
LC: QC174.8.I89.
-
Stephen Joe, Frances Kuo
Remark on Algorithm 659:
Implementing Sobol's Quasirandom Sequence Generator,
ACM Transactions on Mathematical Software,
Volume 29, Number 1, March 2003, pages 49-57.
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.
-
Bradley Keister,
Multidimensional Quadrature Algorithms,
Computers in Physics,
Volume 10, Number 2, March/April, 1996, pages 119-122.
-
Arnold Krommer, Christoph Ueberhuber,
Numerical Integration on Advanced Computer Systems,
Springer, 1994,
ISBN: 3540584102,
LC: QA299.3.K76.
-
Anargyros Papageorgiou, Joseph Traub,
Faster Evaluation of Multidimensional Integrals,
Computers in Physics,
Volume 11, Number 6, November/December 1997, pages 574-578.
-
Thomas Patterson,
On the Construction of a Practical Ermakov-Zolotukhin
Multiple Integrator,
in Numerical Integration:
Recent Developments, Software and Applications,
edited by Patrick Keast and Graeme Fairweather,
D. Reidel, 1987, pages 269-290,
LC: QA299.3.N38.
-
Arthur Stroud,
Approximate Calculation of Multiple Integrals,
Prentice Hall, 1971,
ISBN: 0130438936,
LC: QA311.S85.
-
Arthur Stroud, Don Secrest,
Gaussian Quadrature Formulas,
Prentice Hall, 1966,
LC: QA299.4G3S7.
-
Xiaoqun Wang, Kai-Tai Fang,
The Effective Dimension and quasi-Monte Carlo Integration,
Journal of Complexity,
Volume 19, pages 101-124, 2003.
Source Code:
Last revised on 04 September 2020.