| Crates.io | shuffle |
| lib.rs | shuffle |
| version | 0.2.1 |
| created_at | 2019-10-01 17:33:26.105251+00 |
| updated_at | 2025-12-04 21:07:26.34069+00 |
| description | Implementation of various shuffling algorithms over slices. |
| homepage | |
| repository | https://github.com/adambudziak/shuffle |
| max_upload_size | |
| id | 169150 |
| size | 20,527 |
Various shuffling algorithms for rust.
no_std SupportThis crate is no_std compatible but requires the alloc crate (for Vec).
use shuffle::shuffler::Shuffler;
use shuffle::irs::Irs;
use rand::rngs::mock::StepRng;
let mut rng = StepRng::new(2, 13);
let mut irs = Irs::default();
let mut input = vec![1, 2, 3, 4, 5];
irs.shuffle(&mut input, &mut rng);
assert_eq!(&input, &[4, 1, 5, 3, 2]);