LATTICE_RULE
Lattice Rules for Multiple Integration
LATTICE_RULE
is a MATLAB library which
approximates integrals in multiple
dimensions using lattice rules.
The lattice rules are defined on the unit square, or in higher
dimensions, on the unit hypercube.
Lattice rules are more suitable to integrands that are periodic,
with period 1, in all variables. However, there are techniques
that may be used when the integrand does not satisfy this requirement.
The performance of a lattice rule depends heavily on the choice
of the generator vectors. Once the spatial dimension and the
number of points have been chosen, there are techniques for
finding a good generator vector.
The simplest lattice rules are called "rank 1" rules, and
use a lattice generated by multiples of a single generator vector.
More elaborate rules can be generated by using more generator vectors,
up to the maximum, which is the dimension of the space.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
LATTICE_RULE is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Programs:
FAURE,
a MATLAB library which
computes elements of a Faure quasirandom sequence.
GRID,
a MATLAB library which
computes elements of a grid dataset.
HALTON,
a MATLAB library which
computes elements of a Halton quasirandom sequence.
HAMMERSLEY,
a MATLAB library which
computes elements of a Hammersley quasirandom sequence.
HEX_GRID,
a MATLAB library which
computes elements of a hexagonal grid dataset.
HEX_GRID_ANGLE,
a MATLAB library which
computes elements of an angled hexagonal grid dataset.
IHS,
a MATLAB library which
computes elements of an improved distributed Latin hypercube dataset.
LATIN_CENTER,
a MATLAB library which
computes elements of a Latin Hypercube dataset, choosing center points.
LATIN_EDGE,
a MATLAB library which
computes elements of a Latin Hypercube dataset, choosing edge points.
LATIN_RANDOM,
a MATLAB library which
computes elements of a Latin Hypercube dataset, choosing
points at random.
LCVT,
a MATLAB library which
computes a latinized
Centroidal Voronoi Tessellation.
NIEDERREITER2,
a MATLAB library which
computes elements of a Niederreiter quasirandom sequence with base 2.
NINT_EXACTNESS,
a MATLAB program which
measures the polynomial exactness of a multidimensional quadrature rule.
NINTLIB,
a MATLAB library which
contains routines for numerical estimation of integrals in multiple dimensions.
POWER_RULE,
a MATLAB program which
constructs a power rule, that is, a product quadrature rule
from identical 1D factor rules.
QUADRATURE_RULES,
a dataset directory which
contains sets of files that define quadrature
rules over various 1D intervals or multidimensional hypercubes.
QUADRULE,
a MATLAB library which
defines a number of quadrature rules.
SOBOL,
a MATLAB library which
computes elements of a Sobol quasirandom sequence.
STROUD,
a MATLAB library which
contains quadrature
rules for a variety of unusual areas, surfaces and volumes in 2D,
3D and Ndimensions.
TEST_NINT,
a MATLAB library which
defines test functions for multidimensional quadrature routines.
UNIFORM,
a MATLAB library which
computes elements of a uniform pseudorandom sequence.
Reference:

Seymour Haber,
Parameters for Integrating Periodic Functions of
Several Variables,
Mathematics of Computation,
Volume 41, Number 163, July 1983, pages 115129.

Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms for Computers and Calculators,
Second Edition,
Academic Press, 1978,
ISBN: 0125192606,
LC: QA164.N54.

Ian Sloan, Stephen Joe,
Lattice Methods for Multiple Integration,
Oxford University Press, 1994,
ISBN: 0198534728,
LC: QA311.S56
Source Code:

e_01_2d.m,
the exact integral of 2d test function #1.

f_01_2d.m,
is the 2D test function #1.

f2.m,
evaluates a function of a scalar used in defining P2(Q).

f20_s.m,
evaluates a function of a vector used in defining P2(Q).

fibonacci.m,
returns the Fibonacci number of given index.

fibonacci_lattice_b.m,
applies an optimal Fibonacci lattice integration rule in 2D.

fibonacci_lattice_q.m,
applies a Fibonacci lattice integration rule in 2D.

fibonacci_lattice_q_nodes.m,
returns Fibonacci lattice nodes in 2D.

fibonacci_lattice_q1.m,
applies a Fibonacci lattice integration rule in 2D.

fibonacci_lattice_q2.m,
applies a Fibonacci lattice integration rule in 2D.

fibonacci_lattice_q3.m,
applies a Fibonacci lattice integration rule in 2D.

fibonacci_lattice_t.m,
applies a symmetric Fibonacci lattice integration rule in 2D.

find_z20.m,
finds the appropriate Z vector to minimize P2(QS).

gray_next.m,
generates the next Gray code by switching one item at a time.

i4_huge.m,
returns a "huge" I4.

i4vec_print.m,
prints an I4VEC.

lattice.m,
applies a lattice integration rule.

lattice_np0.m,
applies a lattice integration rule to a nonperiodic function.

lattice_np1.m,
applies a lattice integration rule to a nonperiodic function.

lattice_print.m,
prints the points in a lattice rule.

monte_carlo.m,
applies a Monte Carlo integration rule.

prime.m,
returns any of the first PRIME_MAX prime numbers.

r8_huge.m,
returns a "huge" R8.

r8mat_transpose_print.m,
prints a R8MAT, transposed.

r8mat_transpose_print_some.m,
prints some of a R8MAT, transposed.

r8vec_uniform_01.m,
returns a random R8VEC.

s_len_trim.m,
returns the length of a string to the last nonblank.

timestamp.m,
prints the current YMDHMS date as a time stamp.

tuple_next.m,
computes the next element of a tuple space.
Examples and Tests:

lattice_rule_test.m,
calls all the tests.

lattice_rule_prb_output.txt,
the output file.

lattice_rule_test01.m,
tests FIBONACCI_LATTICE_Q;

lattice_rule_test02.m,
tests FIBONACCI_LATTICE_T.

lattice_rule_test03.m,
tests tests FIBONACCI_LATTICE_B;

lattice_rule_test04.m,
tests FIBONACCI_LATTICE_Q1;

lattice_rule_test05.m,
tests FIBONACCI_LATTICE_Q2;

lattice_rule_test06.m,
tests tests FIBONACCI_LATTICE_Q3;

lattice_rule_test07.m,
tests tests LATTICE.

lattice_rule_test08.m,
tests tests LATTICE.

lattice_rule_test085.m,
tests tests LATTICE.

lattice_rule_test09.m,
tests tests LATTICE_NP0;

lattice_rule_test10.m,
tests LATTICE_NP1;

lattice_rule_test11.m,
tests MONTE_CARLO;

lattice_rule_test12.m,
tests LATTICE_PRINT.

lattice_rule_test13.m,
tests tests FIND_Z20.

lattice_rule_test14.m,
tests FIBONACCI_LATTICE_Q_NODES.

f21.txt,
the 21 points of a Fibonacci lattice for K = 8, M = 21.

f21.png,
a PNG image of
a Fibonacci lattice.

f144.txt,
the 144 points of a Fibonacci lattice for K = 12, M = 144.

f144.png,
a PNG image of
a Fibonacci lattice.
You can go up one level to
the MATLAB source codes.
Last revised on 19 November 2008.