Skip to contents

This function generates (deterministic) points of the Halton sequence, which is a low-discrepancy sequence that covers the unit cube more evenly than random points.

Usage

halton_points(n, dim, start = 1)

Arguments

n

[integer(1)]
The number of points.

dim

[integer(1)]
The dimension.

start

[integer(1)]
The index of the first point. By default, the sequence starts with index one, since the point with index zero is the origin.

Value

A matrix with n rows and dim columns, where each row is a point in the unit cube.

References

Halton, J. H. (1960). On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals. Numerische Mathematik 2, 84–90. doi:10.1007/BF01386213

Examples

halton_points(n = 5, dim = 2)
#>       [,1]      [,2]
#> [1,] 0.500 0.3333333
#> [2,] 0.250 0.6666667
#> [3,] 0.750 0.1111111
#> [4,] 0.125 0.4444444
#> [5,] 0.625 0.7777778