RNG_MT19937Trait

Trait RNG_MT19937Trait 

Source
pub trait RNG_MT19937Trait: RNG_MT19937TraitConst {
    // Required method
    fn as_raw_mut_RNG_MT19937(&mut self) -> *mut c_void;

    // Provided methods
    fn seed(&mut self, s: u32) -> Result<()> { ... }
    fn next(&mut self) -> Result<u32> { ... }
    fn to_i32(&mut self) -> Result<i32> { ... }
    fn to_u32(&mut self) -> Result<u32> { ... }
    fn to_f32(&mut self) -> Result<f32> { ... }
    fn to_f64(&mut self) -> Result<f64> { ... }
    fn to_u32_with_max(&mut self, n: u32) -> Result<u32> { ... }
    fn uniform(&mut self, a: i32, b: i32) -> Result<i32> { ... }
    fn uniform_1(&mut self, a: f32, b: f32) -> Result<f32> { ... }
    fn uniform_2(&mut self, a: f64, b: f64) -> Result<f64> { ... }
}
Expand description

Mutable methods for core::RNG_MT19937

Required Methods§

Provided Methods§

Source

fn seed(&mut self, s: u32) -> Result<()>

Source

fn next(&mut self) -> Result<u32>

Source

fn to_i32(&mut self) -> Result<i32>

Source

fn to_u32(&mut self) -> Result<u32>

Source

fn to_f32(&mut self) -> Result<f32>

Source

fn to_f64(&mut self) -> Result<f64>

Source

fn to_u32_with_max(&mut self, n: u32) -> Result<u32>

Source

fn uniform(&mut self, a: i32, b: i32) -> Result<i32>

returns uniformly distributed integer random number from [a,b) range

Source

fn uniform_1(&mut self, a: f32, b: f32) -> Result<f32>

returns uniformly distributed floating-point random number from [a,b) range

Source

fn uniform_2(&mut self, a: f64, b: f64) -> Result<f64>

returns uniformly distributed double-precision floating-point random number from [a,b) range

Implementors§