ferray-random
Random number generation and distributions for the ferray scientific computing library.
What's in this crate
- Generator API:
Generatortype with pluggableBitGeneratorbackends - BitGenerators: Xoshiro256** (default), PCG64, Philox
- 30+ distributions: Normal, Uniform, Exponential, Poisson, Binomial, Gamma, Beta, Chi-squared, Student-t, Laplace, Weibull, and more
- Permutations:
shuffle,permutation,choice(with/without replacement, weighted) - Parallel generation:
standard_normal_parallelwith Rayon + jump-ahead - Deterministic: All output is reproducible given the same seed
Usage
use ;
let mut rng = default_rng_seeded;
// Uniform [0, 1)
let samples = rng.random.unwrap;
// Standard normal
let normals = rng.standard_normal.unwrap;
// Integers in [0, 10)
let ints = rng.integers.unwrap;
This crate is re-exported through the main ferray crate with the random feature.
License
MIT OR Apache-2.0