vanDerCorput: Generate van der Corput sequences

Description Usage Arguments Value References Examples

View source: R/violinPoint.R

Description

Generates the first (or an arbitrary offset) n elements of the van der Corput low-discrepancy sequence for a given base

Usage

1
vanDerCorput(n, base = 2, start = 1)

Arguments

n

the first n elements of the van der Corput sequence

base

the base to use for calculating the van der Corput sequence

start

start at this position in the sequence

Value

a vector of length n with values ranging between 0 and 1

References

https://en.wikipedia.org/wiki/Van_der_Corput_sequence

Examples

1

Example output

  [1] 0.5000000 0.2500000 0.7500000 0.1250000 0.6250000 0.3750000 0.8750000
  [8] 0.0625000 0.5625000 0.3125000 0.8125000 0.1875000 0.6875000 0.4375000
 [15] 0.9375000 0.0312500 0.5312500 0.2812500 0.7812500 0.1562500 0.6562500
 [22] 0.4062500 0.9062500 0.0937500 0.5937500 0.3437500 0.8437500 0.2187500
 [29] 0.7187500 0.4687500 0.9687500 0.0156250 0.5156250 0.2656250 0.7656250
 [36] 0.1406250 0.6406250 0.3906250 0.8906250 0.0781250 0.5781250 0.3281250
 [43] 0.8281250 0.2031250 0.7031250 0.4531250 0.9531250 0.0468750 0.5468750
 [50] 0.2968750 0.7968750 0.1718750 0.6718750 0.4218750 0.9218750 0.1093750
 [57] 0.6093750 0.3593750 0.8593750 0.2343750 0.7343750 0.4843750 0.9843750
 [64] 0.0078125 0.5078125 0.2578125 0.7578125 0.1328125 0.6328125 0.3828125
 [71] 0.8828125 0.0703125 0.5703125 0.3203125 0.8203125 0.1953125 0.6953125
 [78] 0.4453125 0.9453125 0.0390625 0.5390625 0.2890625 0.7890625 0.1640625
 [85] 0.6640625 0.4140625 0.9140625 0.1015625 0.6015625 0.3515625 0.8515625
 [92] 0.2265625 0.7265625 0.4765625 0.9765625 0.0234375 0.5234375 0.2734375
 [99] 0.7734375 0.1484375

vipor documentation built on May 1, 2019, 7:06 p.m.