Function sobol_burley::sample
source · pub fn sample(sample_index: u32, dimension: u32, seed: u32) -> f32
Expand description
Compute one dimension of a single sample in the Sobol sequence.
sample_index
specifies which sample in the Sobol sequence to compute.
A maxmimum of 2^16 samples is supported.
dimension
specifies which dimension to compute.
seed
produces statistically independent Sobol sequences. Passing two
different seeds will produce two different sequences that are only randomly
associated, with no stratification or correlation between them.
Returns a number in the interval [0, 1).
Panics
- Panics if
dimension
is greater than or equal toNUM_DIMENSIONS
. - In debug, panics if
sample_index
is greater than or equal to 2^16. In release, returns unspecified floats in the interval [0, 1).