Struct ai_dataloader::indexable::sampler::RandomSampler
source · pub struct RandomSampler { /* private fields */ }Expand description
Sampler that returns random index between zero and data_source_len.
Trait Implementations
sourceimpl Clone for RandomSampler
impl Clone for RandomSampler
sourcefn clone(&self) -> RandomSampler
fn clone(&self) -> RandomSampler
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for RandomSampler
impl Debug for RandomSampler
sourceimpl Hash for RandomSampler
impl Hash for RandomSampler
sourceimpl IntoIterator for RandomSampler
impl IntoIterator for RandomSampler
sourceimpl Len for RandomSampler
impl Len for RandomSampler
sourceimpl Ord for RandomSampler
impl Ord for RandomSampler
sourcefn cmp(&self, other: &RandomSampler) -> Ordering
fn cmp(&self, other: &RandomSampler) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<RandomSampler> for RandomSampler
impl PartialEq<RandomSampler> for RandomSampler
sourcefn eq(&self, other: &RandomSampler) -> bool
fn eq(&self, other: &RandomSampler) -> bool
sourceimpl PartialOrd<RandomSampler> for RandomSampler
impl PartialOrd<RandomSampler> for RandomSampler
sourcefn partial_cmp(&self, other: &RandomSampler) -> Option<Ordering>
fn partial_cmp(&self, other: &RandomSampler) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl Sampler for RandomSampler
impl Sampler for RandomSampler
impl Copy for RandomSampler
impl Eq for RandomSampler
impl StructuralEq for RandomSampler
impl StructuralPartialEq for RandomSampler
Auto Trait Implementations
impl RefUnwindSafe for RandomSampler
impl Send for RandomSampler
impl Sync for RandomSampler
impl Unpin for RandomSampler
impl UnwindSafe for RandomSampler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more