[][src]Trait math::sample::Sample

pub trait Sample<'a, I: Iterator<Item = E>, E, O: Collecting<E> + Default>: Finite + ToIterator<'a, I, E> {
    fn sample_subset_without_replacement<'s: 'a>(
        &'s self,
        size: usize
    ) -> Result<O, String> { ... }
fn sample_with_replacement<'s: 'a>(
        &'s self,
        size: usize
    ) -> Result<O, String> { ... } }

Provided methods

fn sample_subset_without_replacement<'s: 'a>(
    &'s self,
    size: usize
) -> Result<O, String>

samples size elements without replacement size: the number of samples to be drawn returns Err if size is larger than the population size

fn sample_with_replacement<'s: 'a>(&'s self, size: usize) -> Result<O, String>

Loading content...

Implementations on Foreign Types

impl<'a, E: Clone> Sample<'a, Iter<'a, E>, &'a E, Vec<E>> for Vec<E> where
    &'a E: Deref
[src]

Loading content...

Implementors

impl<E, '_> Sample<'_, ContiguousIntegerSetIter<E>, E, OrderedIntegerSet<E>> for ContiguousIntegerSet<E> where
    E: Integer + Copy + ToPrimitive
[src]

impl<E, '_> Sample<'_, IntegerSetIter<E>, E, OrderedIntegerSet<E>> for OrderedIntegerSet<E> where
    E: Integer + Copy + Sum + ToPrimitive
[src]

Loading content...