Trait probability::prelude::Source
[−]
pub trait Source { fn read_u64(&mut self) -> u64; fn read_f64(&mut self) -> f64 { ... } fn read<T>(&mut self) -> T where T: Element { ... } fn iter<T>(&'l mut self) -> Sequence<'l, Self, T> where T: Element { ... } }
A source of randomness.
Required Methods
fn read_u64(&mut self) -> u64
Read a random u64
.
The implied distribution is a uniform distribution whose support is the
set {0, 1, …, u64::MAX}
.
Provided Methods
fn read_f64(&mut self) -> f64
Read a random f64
.
The implied distribution is a uniform distribution whose support is the
interval [0, 1]
.
fn read<T>(&mut self) -> T where T: Element
Read a random element.
fn iter<T>(&'l mut self) -> Sequence<'l, Self, T> where T: Element
Read a sequence of random elements.
Implementors
impl Source for Default
impl Source for Xorshift128Plus