Skip to main content

Module rand

Module rand 

Source
Expand description

Randomness utilities.

Structs§

Boundary
A boundary-value sampler for T: each fixed-width max ±1 and the half-range midpoint ±1. Boundary::<T>::new().sample(rng) returns one.
Probe
A range-bounded, boundary-biased u64 sampler: about one draw in four a range edge, the rest log-uniform over the non-zero interior, so 0 appears only as an edge.
Wide
A log-uniform, random-sign magnitude sampler with a boundary tail. See the section note above.