Struct streaming_algorithms::SampleTotal [−][src]
pub struct SampleTotal { /* fields omitted */ }Given population and sample sizes, returns true if this element is in the sample. Without replacement.
Methods
impl SampleTotal[src]
impl SampleTotalpub fn new(total: usize, samples: usize) -> Self[src]
pub fn new(total: usize, samples: usize) -> SelfCreate a SampleTotal that will provide a sample of size samples of a population of size total.
pub fn sample<R: Rng>(&mut self, rng: &mut R) -> bool[src]
pub fn sample<R: Rng>(&mut self, rng: &mut R) -> boolReturns whether or not to this value is in the sample
Trait Implementations
impl Clone for SampleTotal[src]
impl Clone for SampleTotalfn clone(&self) -> SampleTotal[src]
fn clone(&self) -> SampleTotalReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for SampleTotal[src]
impl Debug for SampleTotalfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Drop for SampleTotal[src]
impl Drop for SampleTotalAuto Trait Implementations
impl Send for SampleTotal
impl Send for SampleTotalimpl Sync for SampleTotal
impl Sync for SampleTotal