pub struct RandomSampling<G: PdfGenerator<Ix1>>(/* private fields */);Expand description
A generator that randomly samples the PDF without replacement.
Iteration alters the random seed.
Implementations§
Source§impl<G: PdfGenerator<Ix1>> RandomSampling<G>
impl<G: PdfGenerator<Ix1>> RandomSampling<G>
Sourcepub const fn new(pdf: G, seed: [u8; 32]) -> RandomSampling<G>
pub const fn new(pdf: G, seed: [u8; 32]) -> RandomSampling<G>
Create a new RandomSampling from a seed.
Trait Implementations§
Source§impl<G: Clone + PdfGenerator<Ix1>> Clone for RandomSampling<G>
impl<G: Clone + PdfGenerator<Ix1>> Clone for RandomSampling<G>
Source§fn clone(&self) -> RandomSampling<G>
fn clone(&self) -> RandomSampling<G>
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<G: Debug + PdfGenerator<Ix1>> Debug for RandomSampling<G>
impl<G: Debug + PdfGenerator<Ix1>> Debug for RandomSampling<G>
Source§impl<G: PdfGenerator<Ix1>> Generator<Dim<[usize; 1]>> for RandomSampling<G>
impl<G: PdfGenerator<Ix1>> Generator<Dim<[usize; 1]>> for RandomSampling<G>
Source§fn _generate_no_trace(
&self,
count: usize,
dims: Ix1,
iteration: u64,
) -> Schedule<Ix1>
fn _generate_no_trace( &self, count: usize, dims: Ix1, iteration: u64, ) -> Schedule<Ix1>
This function may be overridden when a generator can be sped up in cases where the trace is not needed. Users should not call this directly because it doesn’t perform correctness assertions.
Source§fn _generate(&self, count: usize, dims: Ix1, iteration: u64) -> Trace<Ix1>
fn _generate(&self, count: usize, dims: Ix1, iteration: u64) -> Trace<Ix1>
The underlying implementation of a schedule generator. Users should not call this directly because it doesn’t perform correctness assertions. Read more
Source§fn generate(&self, count: usize, dims: Dim) -> Schedule<Dim>
fn generate(&self, count: usize, dims: Dim) -> Schedule<Dim>
Generate a schedule where the iteration parameter is set to zero.
Source§fn generate_with_iter(
&self,
count: usize,
dims: Dim,
iteration: u64,
) -> Schedule<Dim>
fn generate_with_iter( &self, count: usize, dims: Dim, iteration: u64, ) -> Schedule<Dim>
Generate a schedule with a user-defined iteration parameter.
Source§fn generate_with_trace(&self, count: usize, dims: Dim) -> Trace<Dim>
fn generate_with_trace(&self, count: usize, dims: Dim) -> Trace<Dim>
Generate a schedule including trace output from each generation step. Read more
impl<G: Copy + PdfGenerator<Ix1>> Copy for RandomSampling<G>
Auto Trait Implementations§
impl<G> Freeze for RandomSampling<G>where
G: Freeze,
impl<G> RefUnwindSafe for RandomSampling<G>where
G: RefUnwindSafe,
impl<G> Send for RandomSampling<G>where
G: Send,
impl<G> Sync for RandomSampling<G>where
G: Sync,
impl<G> Unpin for RandomSampling<G>where
G: Unpin,
impl<G> UnwindSafe for RandomSampling<G>where
G: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FillCornersBuilder for T
impl<T> FillCornersBuilder for T
Source§impl<Dim, T> IterateBuilder<Dim> for T
impl<Dim, T> IterateBuilder<Dim> for T
Source§impl<T> PSFPolisherBuilder for T
impl<T> PSFPolisherBuilder for T
Source§fn polish_psf(
self,
threshold: f64,
swap_value: f64,
mode: DisplayMode,
) -> <PSFPolisher as Modifier<Ix1>>::Output<Self>where
Self: Sized,
fn polish_psf(
self,
threshold: f64,
swap_value: f64,
mode: DisplayMode,
) -> <PSFPolisher as Modifier<Ix1>>::Output<Self>where
Self: Sized,
Swap sample points to smooth away point-spread function artifacts.