Struct rand_functors::PopulationSampler
source · pub struct PopulationSampler<const N: usize>;
Expand description
Produces a random subset (technically, submultiset) of possible outputs of the random process.
Trait Implementations§
source§impl<const N: usize> Clone for PopulationSampler<N>
impl<const N: usize> Clone for PopulationSampler<N>
source§fn clone(&self) -> PopulationSampler<N>
fn clone(&self) -> PopulationSampler<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<const N: usize> Debug for PopulationSampler<N>
impl<const N: usize> Debug for PopulationSampler<N>
source§impl<const N: usize> Default for PopulationSampler<N>
impl<const N: usize> Default for PopulationSampler<N>
source§fn default() -> PopulationSampler<N>
fn default() -> PopulationSampler<N>
Returns the “default value” for a type. Read more
source§impl<const N: usize> Hash for PopulationSampler<N>
impl<const N: usize> Hash for PopulationSampler<N>
source§impl<const N: usize> PartialEq for PopulationSampler<N>
impl<const N: usize> PartialEq for PopulationSampler<N>
source§fn eq(&self, other: &PopulationSampler<N>) -> bool
fn eq(&self, other: &PopulationSampler<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<const N: usize> RandomStrategy for PopulationSampler<N>
impl<const N: usize> RandomStrategy for PopulationSampler<N>
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: Fn(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: Fn(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<const N: usize> Copy for PopulationSampler<N>
impl<const N: usize> Eq for PopulationSampler<N>
impl<const N: usize> StructuralPartialEq for PopulationSampler<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for PopulationSampler<N>
impl<const N: usize> RefUnwindSafe for PopulationSampler<N>
impl<const N: usize> Send for PopulationSampler<N>
impl<const N: usize> Sync for PopulationSampler<N>
impl<const N: usize> Unpin for PopulationSampler<N>
impl<const N: usize> UnwindSafe for PopulationSampler<N>
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