Modules

Constants

  • While impl_32::gen_index supports producing indices up to u32::MAX, in practice, the rejection rate rises significantly for large upper bounds and it’s then typically faster to use impl_64::gen_index in these regimes. This constant gives the recommended size when to switch.

Functions

  • Generates an index from the exclusive range 0..ub uniformly at random. It is functionally equivalent to rng.gen_range(0..ub) but is much faster.