4 releases (2 breaking)
0.3.0 | Jun 30, 2023 |
---|---|
0.2.0 | May 17, 2023 |
0.1.1 | May 6, 2022 |
0.1.0 | May 4, 2022 |
#2219 in Algorithms
52 downloads per month
Used in ordlebot
50KB
689 lines
mersenne-twister
Mersenne Twister(MT19937) implementation in Rust. Found on crates as mersenne-twister-m
Examples
Create MT19937 instance with either default seed
let mut mt = MT19937::default();
let mut mt = MT19937::new();
or a custom seed
let mut mt = MT19937::new_with_seed(4537);
generate or peek random value with
mt.genrand()
mt.peek()
Build
Build with
cargo build
Test
Run tests with
cargo test