Struct rand::distributions::DistMap
source · pub struct DistMap<D, F, T, S> { /* private fields */ }
Expand description
A distribution of values of type S
derived from the distribution D
by mapping its output of type T
through the closure F
.
This struct
is created by the Distribution::map
method.
See its documentation for more.
Trait Implementations§
source§impl<D, F, T, S> Distribution<S> for DistMap<D, F, T, S>where
D: Distribution<T>,
F: Fn(T) -> S,
impl<D, F, T, S> Distribution<S> for DistMap<D, F, T, S>where D: Distribution<T>, F: Fn(T) -> S,
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> S
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> S
Generate a random value of
T
, using rng
as the source of randomness.