Expand description
Methods for choosing random elements from an iterator.
§Usage
use kindness::*;
use rand::rngs::StdRng;
fn main() {
use rand::SeedableRng;
let mut rng = StdRng::seed_from_u64(123);
let m =[3,2,1,2,3].iter().choose_max(&mut rng).unwrap();
assert_eq!(*m, 3)
}§Readme Docs
You can find the crate’s readme documentation on the
crates.io page, or alternatively in the README.md file on the GitHub project repo.
Modules§
- uniform
- Uniform distribution