RandomizedQuasiMonteCarlo.bits2int
— Methodbits2int(bit::AbstractMatrix{<:Integer}, b::Integer)
Convert a matrix n×M of "bits" in base b into a vector of integers. Inverse of int2bits
RandomizedQuasiMonteCarlo.bits2int
— Methodbits2int(bits::BitMatrix)
Convert a matrix n×M of "bits" in base 2 into a vector of integers. Inverse of int2bits
RandomizedQuasiMonteCarlo.bits2unif
— Methodbits2unif(bits::AbstractArray{<:Integer}, b::Integer)
Convert a vector of M "bits" in base b into a number y∈[0,1[.
RandomizedQuasiMonteCarlo.bits2unif
— Methodbits2unif(bits::BitArray)
Convert a vector of M "bits" in base 2 into a number y∈[0,1[.
RandomizedQuasiMonteCarlo.int2bits
— Methodint2bits(x::Int, M)
Convert an integer x into M bits For large x (or small M) you get bits of x modulo 2^M
RandomizedQuasiMonteCarlo.linear_matrix_scramble
— Methodnested_uniform_scramble(points::AbstractArray, b::Integer; M=32)
Return a scrambled version of the points
. The scrambling method is Linear Matrix Scrambling Scrambling which was introduced in Matousek (1998). M
is the number of bits used for each points. One need M ≥ log(base, n)
.
RandomizedQuasiMonteCarlo.linear_matrix_scramble
— Methodnested_uniform_scramble(points::AbstractArray; M=32)
Return a scrambled version of the points
. The scrambling method is Linear Matrix Scrambling Scrambling which was introduced in Matousek (1998). M
is the number of bits used for each points. One need M ≥ log(base, n)
.
RandomizedQuasiMonteCarlo.nested_uniform_scramble
— Methodnested_uniform_scramble(points::AbstractArray; M=32)
Return a scrambled version of the points
. The scrambling method is Nested Uniform Scrambling which was introduced in Owen (1995). M is the number of bits used for each points. One need M ≥ log(base, n).
RandomizedQuasiMonteCarlo.nested_uniform_scramble
— Methodnested_uniform_scramble(points::AbstractArray; M=32)
Return a scrambled version of the points
. The scrambling method is Nested Uniform Scrambling which was introduced in Owen (1995). M is the number of bits used for each points. One need M ≥ log(base, n).
RandomizedQuasiMonteCarlo.shift
— Methodshift(x::AbstractArray)
Cranley Patterson Rotation i.e. y = (x .+ U) mod 1
where U ∼ 𝕌([0,1]ᵈ)
and x
is a n×d
matrix
RandomizedQuasiMonteCarlo.unif2bits
— Methodunif2bits(y, b::Integer; M=32)
Return the b-adic decomposition y = ∑ₖ yₖ/bᵏ a number y∈[0,1[ -> [y₁, ⋯, yₘ]
RandomizedQuasiMonteCarlo.unif2bits
— Methodunif2bits(y; M=32)
Return the binary decomposition y = ∑ₖ yₖ/2ᵏ a number y∈[0,1[ -> [y₁, ⋯, yₘ]
RandomizedQuasiMonteCarlo.which_permutation
— Methodwhich_permutation(bits::AbstractArray{<:Integer,3}, b)
This function is used in Nested Uniform Scramble. It assigns for each points (in every dimensions) m
number corresponding to its location on the slices 1, 1/b, 1/b², ..., 1/bᵐ⁻¹ of the axes [0,1[. This also can be used to verify some equidistribution prorepreties.