Struct nannou::rand::rand::distributions::DistMap [−][src]
pub struct DistMap<D, F, T, S> { /* fields omitted */ }
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
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,
Generate a random value of T
, using rng
as the source of randomness.
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘ where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>ⓘ where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Auto Trait Implementations
impl<D, F, T, S> RefUnwindSafe for DistMap<D, F, T, S> where
D: RefUnwindSafe,
F: RefUnwindSafe,
impl<D, F, T, S> UnwindSafe for DistMap<D, F, T, S> where
D: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more