Sobol

class modcma.sampling.Sobol(d: int, seed: int = 0)

Bases: collections.abc.Iterator

Iterator implementing Sobol Quasi random sequences.

This is an iterator version of the version implemented in the python package: sobol-seq==0.2.0. This version is 4x faster due to better usage of numpy vectorization.

d

dimension

Type

int

seed

sample seed

Type

int

v

array of sample directions

Type

np.ndarray

recipd

1/(common denominator of the elements in v)

Type

int

lastq

vector containing last sample directions

Type

np.ndarray

Methods Summary

h1(n)

Return high 1 bit index for a given integer.

l0(n)

Return low 0 bit index for a given integer.

Methods Documentation

static h1(n: int) → int

Return high 1 bit index for a given integer.

static l0(n: int) → int

Return low 0 bit index for a given integer.