pub struct Calculator { /* private fields */ }
Implementations§
Source§impl Calculator
impl Calculator
pub fn new() -> Self
Sourcepub fn pop(&mut self, sample: u32, unique: u32) -> Result<u32, PopProbError>
pub fn pop(&mut self, sample: u32, unique: u32) -> Result<u32, PopProbError>
Calculates the most likely population size if sample
elements are selected randomly
with replacement from the population and unique
of these elements are unique.
Sourcepub fn prob_pop(
&mut self,
sample: u32,
unique: u32,
size: u32,
) -> Result<f64, PopProbError>
pub fn prob_pop( &mut self, sample: u32, unique: u32, size: u32, ) -> Result<f64, PopProbError>
Calculates the probability that a population contains exactly size
unique elements if
sample
elements are selected randomly with replacement from the population and
unique
of these elements are unique.
Auto Trait Implementations§
impl Freeze for Calculator
impl RefUnwindSafe for Calculator
impl Send for Calculator
impl Sync for Calculator
impl Unpin for Calculator
impl UnwindSafe for Calculator
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