Struct rand_functors::Sampler
source · pub struct Sampler;
Expand description
Samples the desired distributions and produces a single possible output of the random process.
Trait Implementations§
source§impl FlattenableRandomStrategy for Sampler
impl FlattenableRandomStrategy for Sampler
source§impl PartialEq for Sampler
impl PartialEq for Sampler
source§impl RandomStrategy for Sampler
impl RandomStrategy for Sampler
source§fn fmap<A: Inner, B: Inner, F: Fn(A) -> B>(
f: Self::Functor<A>,
func: F
) -> Self::Functor<B>
fn fmap<A: Inner, B: Inner, F: Fn(A) -> B>( f: Self::Functor<A>, func: F ) -> Self::Functor<B>
Applies the given function to the functor’s inner.
source§fn fmap_rand<A: Inner, B: Inner, R: RandomVariable, F: FnOnce(A, R) -> B>(
f: Self::Functor<A>,
rng: &mut impl Rng,
func: F
) -> Self::Functor<B>where
Standard: Distribution<R>,
fn fmap_rand<A: Inner, B: Inner, R: RandomVariable, F: FnOnce(A, R) -> B>(
f: Self::Functor<A>,
rng: &mut impl Rng,
func: F
) -> Self::Functor<B>where
Standard: Distribution<R>,
Using the strategy specified by the implementor, applies the given
binary function to the given functor and an element of the sample space
of a
RandomVariable
. Read moresource§fn fmap_rand_range<A: Inner, B: Inner, R: RandomVariable + SampleUniform, F: Fn(A, R) -> B>(
f: Self::Functor<A>,
range: impl RandomVariableRange<R>,
rng: &mut impl Rng,
func: F
) -> Self::Functor<B>where
Standard: Distribution<R>,
fn fmap_rand_range<A: Inner, B: Inner, R: RandomVariable + SampleUniform, F: Fn(A, R) -> B>(
f: Self::Functor<A>,
range: impl RandomVariableRange<R>,
rng: &mut impl Rng,
func: F
) -> Self::Functor<B>where
Standard: Distribution<R>,
Using the strategy specified by the implementor, applies the given
binary function to the given functor and an element of the sample space
of a
RandomVariableRange
. Read moreimpl Copy for Sampler
impl Eq for Sampler
impl StructuralPartialEq for Sampler
Auto Trait Implementations§
impl Freeze for Sampler
impl RefUnwindSafe for Sampler
impl Send for Sampler
impl Sync for Sampler
impl Unpin for Sampler
impl UnwindSafe for Sampler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more