vdCorput(n, base)
Halton(n, bases = c(2, 3), raw = FALSE, simplify = TRUE)
Hammersley(n, bases = 2, raw = FALSE, simplify = TRUE)
raw=TRUE
) or as a spatial point
pattern (raw=FALSE
, the default).
ppx
indicating whether
point patterns of dimension 2 or 3 should be
returned as objects of class "ppp"
or "pp3"
respectively (simplify=TRUE
, the default)
or as objects of class "ppx"
(simplify=FALSE
).
vdCorput
, a numeric vector.For Halton
and Hammersley
,
an object of class "ppp"
, "pp3"
or
"ppx"
; or if raw=TRUE
, a numeric matrix.
vdCorput
generates the quasirandom sequence
of Van der Corput (1935) of length n
with the given
base
. These are numbers between 0 and 1 which are in
some sense uniformly distributed over the interval. The function Halton
generates the Halton quasirandom sequence
of points in d
-dimensional space, where
d = length(bases)
. The values of the $i$-th coordinate
of the points are generated using the van der Corput sequence with
base equal to bases[i]
.
The function Hammersley
generates the Hammersley set
of points in d+1
-dimensional space, where
d = length(bases)
. The first d
coordinates
of the points are generated using the van der Corput sequence with
base equal to bases[i]
. The d+1
-th coordinate
is the sequence 1/n, 2/n, ..., 1
.
If raw=FALSE
(the default) then the Halton and Hammersley
sets are interpreted as spatial point patterns of the
appropriate dimension. They are returned as objects of
class "ppx"
(multidimensional point patterns)
unless simplify=TRUE
and d=2
or d=3
when they are returned as objects of class "ppp"
or "pp3"
.
If raw=TRUE
, the coordinates are returned as a matrix
with n
rows and D
columns where D
is the spatial
dimension.
Kuipers, L. and Niederreiter, H. (2005) Uniform distribution of sequences, Dover Publications.
rQuasi
vdCorput(10, 2)
plot(Halton(256, c(2,3)))
plot(Hammersley(256, 3))
Run the code above in your browser using DataLab