Module rip_shuffle::uniform_index
source · Modules
Constants
- While
impl_32::gen_index
supports producing indices up tou32::MAX
, in practice, the rejection rate rises significantly for large upper bounds and it’s then typically faster to useimpl_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 torng.gen_range(0..ub)
but is much faster.