cppBASpts {spbal} | R Documentation |
Generate numbers from a Halton Sequence.
Description
For efficiency, this function can generate points along a random start Halton Sequence for a predefined Halton.
Usage
cppBASpts(
n = 10L,
seeds = as.integer(c()),
bases = as.numeric(c()),
verbose = FALSE
)
Arguments
n |
Number of points required. |
seeds |
Random starting point in each dimension. |
bases |
Co-prime base for the Halton Sequence. |
verbose |
A boolean indicating whether informational messages are to be issued. |
Value
Matrix with the columns, order of points, x in [0,1) and y in [0,1)
Author(s)
This function was first written in R by Blair Robertson, subsequently it was re-written in C/C++ by Phil Davies.
Examples
# First 10 points in the Halton Sequence for base 2,3
spbal::cppBASpts(n = 10)
# First 10 points in the Halton Sequence for base 2,3 with
# starting point at the 15th and 22nd index.
spbal::cppBASpts(n = 10, seeds = c(14, 21))
[Package spbal version 1.0.0 Index]