RSHalton: Generate numbers from a Halton Sequence with a random start

View source: R/HaltonFunctions.r

RSHaltonR Documentation

Generate numbers from a Halton Sequence with a random start

Description

For efficiency, this function can generate points along a random start Halton Sequence for predefined Halton

Usage

RSHalton(n = 10, seeds = c(0, 0), bases = c(2, 3), boxes = 0, J = c(0, 0))

Arguments

n

Number of points required

seeds

Random starting point in each dimension

bases

Co-prime base for the Halton Sequence

boxes

Halton boxes that points are required to be generated in

J

Defines the Halton frame, and relates to the number of boxes used.

Value

Matrix with the columns, order of point, x in [0,1) and y in [0,1)

Examples

## Not run: 
# First 10 points in the Halton Sequence for base 2,3
pts <- RSHalton(n = 10)
# First 10 points in the Halton Sequence for base 2,3 with starting point at the 15th and 22nd index.
pts <- RSHalton(n = 10, seeds = c(14, 21))

## End(Not run)

paul-vdb/DFO-master-sample documentation built on April 5, 2022, 4:35 p.m.