cppRSHalton_br {spbal}R 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 a predefined Halton.

Usage

cppRSHalton_br(
  n = 10L,
  bases = as.numeric(c()),
  seeds = as.numeric(c()),
  verbose = FALSE
)

Arguments

n

Number of points required

bases

Co-prime base for the Halton Sequence

seeds

Random starting point in each dimension

verbose

A boolean indicating whether informational messages are to be issued.

Value

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

Author(s)

This function was first written in R by Blair Robertson, subsequently it was written in C/C++ by Phil Davies.

Examples

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


[Package spbal version 1.0.0 Index]