random_grouping
Utility for random grouping.
The author of this crate is not good at English.
Forgive me if the document is hard to read.
What is this?
This is useful for grouping multiple items into some groups at random.
Examples
let mut rg = new;
let samples = .;
let ratios = ;
let result = rg.divide_by_ratio;
assert!;
for i in 0..result.len
What's New
v0.4.0
- Rust edition is updated to 2024.
- Add
preludemodule (Although this crate is very small). - Polish documentations.
v0.3.1
- Minor refactoring.
v0.3.0
must_useannotations are added atRandomGrouping.
v0.2.3
- Bug fix: Remove unwanted Debug output.
v0.2.0
- The default value of
stablehas been changed totruefromfalse. - The first argument of
divide_by_sizeanddivide_by_ratiois changed toIntoIteratorfrom slice. - Instead,
divide_slice_by_sizeanddivide_slice_by_ratioare introduced (which are faster for slices).