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

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

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

A source of randomness.

Required methods

fn read_u64(&mut self) -> u64

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

Loading content...

Provided methods

fn read_f64(&mut self) -> f64

Read f64 uniformly distributed over [0, 1].

fn read<V>(&mut self) -> V where
    V: Value

Read a random value.

Important traits for Sequence<'l, S, V>
fn iter<V>(&'l mut self) -> Sequence<'l, Self, V> where
    V: Value

Read a sequence of random values.

Loading content...

Implementors

impl Source for Default[src]

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

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

Important traits for Sequence<'l, S, V>
fn iter<V>(&'l mut self) -> Sequence<'l, Self, V> where
    V: Value
[src]

impl Source for Xorshift128Plus[src]

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

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

Important traits for Sequence<'l, S, V>
fn iter<V>(&'l mut self) -> Sequence<'l, Self, V> where
    V: Value
[src]

Loading content...