## Package QuasiRandom

Package description: QuasiRandom

See:
Description

 Class Summary CubeFunction Function of several variables double[] x defined on the unit cube Q=(0,1)^dim and intended to be used as an integrand to check the effectiveness of the various low discrepancy sequences in QMC integration. DigitalRandomSequence Digital low discrepancy sequence with generator matrices populated by random entries. Encode Program decodes the row encoded generator matrices from the NX-sequence site into binary form, then reencodes the columns for use with the Gray code counter in NX-point generation (bottom up encoding of the columns). Halton The Halton sequence. Intgrnd Function f(x)=h(x_1)*h(x_2)*...*h(x_d), where d=dimension, h(u)=g(m*u-[m*u]) and g=g(u) is a function of one variable u\in(0,1) and [t] denotes the largest integer not greater than t as usual. Intgrnd_1 Intgrnd with g(u)=u-0.5. Intgrnd_2 Intgrnd with g(u)=exp(N_Inverse(u)). Intgrnd_3 Intgrnd with g(u)=sin^2(2pi*u). Intgrnd_4 Intgrnd with g(u)=(n+1)*u^n. Intgrnd_5 Intgrnd with g(u)=4-12(u-0.5)^2. Intgrnd_6 Intgrnd with g(u)=3*I_[1/3,2/3](u) (indicator function). LowDiscrepancySequence Interface and methods to compute L2-discrepancy for low discrepancy sequences. NX Niederreiter-Xing low discrepancy sequence with basis b=2 in dimension at most 20. ProjectionPlot2D Main method plots the projection P_{ij}(X(n)) of the sequence X(n) in some high dimensional unit cube onto any two dimensions. SeparableCubeFunction Separable Function f(x)=h(x_1)*h(x_2)*...*h(x_d) defined on the unit cube Q=(0,1)^d. Sobol Generator for the Sobol sequence. Uniform Uniformly distributed sequence in R^d (Mersenne twister).

## Package description: QuasiRandom

The Quasi Monte Carlo (QMC) package. Contains implementations of the Halton, Sobol and Niederreiter-Xing generator in various dimensions:

• Halton: unlimited (but useless in high dimensions)
• Sobol: up to dimension 300 but easily extended if more primitive polynomials modulo two are obtained (see Peter Jaeckels book Monte Carlo Methods in Finance which comes with a disk containing millions of primitive polynomials, only one is needed for each dimension).
• Niederrreiter-Xing: up to dimension 20. Lowest L2-discrepancy in each dimension but there is no easy way to extend this to higher dimensions.
Each low discrepancy sequence has 2 methods to compute its L2-discrepancy, straightforward (non optimized) algorithms are used. This means that this is very slow if the number of low discrepancy points is large.

There are also some nasty test integrals (very narrow and tall spikes all integrating to one in several dimensions) and a class to plot projections of low discrepancy points onto two dimensional coordinate parallel subspaces of the space in which the sequence lives.