Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kemingy/rule30

Repository files navigation

Rule30

Rust crates.io docs.rs PyPI

Pseudo random number generator with cellular automaton rule 30.

Features

  • no_std
  • Extend CA for better performance

Usage

use rule30::prelude::*;


fn main() {
    let mut ca = ExtendedCA::seed_from_u64(42);
    println!("{}", ca.next_u64());
}

To work with rand crate:

use rule30::prelude::*;
use rand::Rng;


fn main() {
    let mut ca = ExtendedCA::seed_from_u64(42);
    println!("{}", ca.gen::<f64>());
}

For Python binding, check rule30py

Reference

About

Pseudo random number generator with cellular automaton rule 30.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •