Trait probability::source::Source[][src]

pub trait Source {
    pub fn read_u64(&mut self) -> u64;

    pub fn read_f64(&mut self) -> f64 { ... }
pub fn read<V>(&mut self) -> V
    where
        V: Value
, { ... }
pub fn iter<V>(&'l mut self) -> Sequence<'l, Self, V>

Notable traits for Sequence<'l, S, V>

impl<'l, S, V> Iterator for Sequence<'l, S, V> where
    S: Source,
    V: Value
type Item = V;

    where
        V: Value
, { ... } }

A source of randomness.

Required methods

pub fn read_u64(&mut self) -> u64[src]

Read u64 uniformly distributed over {0, 1, …, u64::MAX}.

Loading content...

Provided methods

pub fn read_f64(&mut self) -> f64[src]

Read f64 uniformly distributed over [0, 1].

pub fn read<V>(&mut self) -> V where
    V: Value
[src]

Read a random value.

pub fn iter<V>(&'l mut self) -> Sequence<'l, Self, V>

Notable traits for Sequence<'l, S, V>

impl<'l, S, V> Iterator for Sequence<'l, S, V> where
    S: Source,
    V: Value
type Item = V;
where
    V: Value
[src]

Read a sequence of random values.

Loading content...

Implementors

impl Source for Default[src]

impl Source for Xorshift128Plus[src]

Loading content...