Skip to main content

Crate lib_jsl_random

Crate lib_jsl_random 

Source
Expand description

Random number generation: uniform generators, distribution samplers, quasi-random sequences and Markov chain Monte Carlo.

See the book chapter Random numbers.

Modules§

distributions
Transformations of uniform floating point samples [0,1) into the desired distribution, e.g. let sample = distribution(&mut rng, other args...). One module per distribution.
histogram
Fixed-width histograms.
mcmc
Markov chain Monte Carlo: random-walk Metropolis-Hastings.
numpy
NumPy’s default random generator, numpy.random.default_rng(seed): SeedSequence mixing of the seed and the PCG64 generator, so that a seeded run here draws the same uniform numbers as NumPy (and as SciPy functions that take random_state=seed).
qmc
Tools for quasi-Monte Carlo sampling, following scipy.stats.qmc: Latin hypercube samples, the discrepancy of a point set (how far it is from uniform), and scaling between the unit cube and a box. The low-discrepancy sequences themselves, plain or scrambled, are SobolSequence and HaltonSequence.
quasi_random
Low-discrepancy (quasi-random) sequences: Sobol and Halton.
sampling
Random variate generation from a given density or mass function, after the methods of UNU.RAN that scipy.stats.sampling wraps: the alias method and guide-table inversion for discrete distributions, transformed density rejection for log-concave densities, Hermite-interpolated numerical inversion of a distribution function, and the ratio-of-uniforms method.
split_mix_64
SplitMix64, used to seed larger generators.
uniform_generator
xoshiro256plusplus
The xoshiro256++ generator of Blackman and Vigna.