mersenne-twister-m

Crates.iomersenne-twister-m
lib.rsmersenne-twister-m
version0.3.0
sourcesrc
created_at2022-05-04 20:47:57.984671
updated_at2023-06-30 13:17:25.338827
descriptionmersenne twister pseudorandom number generator
homepage
repositoryhttps://github.com/mztikk/mersenne-twister
max_upload_size
id580625
size49,469
Nils Feierabend (mztikk)

documentation

README

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
Commit count: 25

cargo fmt