pub struct BinaryOutcomeCounts {
pub selected: u64,
pub total: u64,
}Expand description
Counts for a binary selection or outcome table.
Fields§
§selected: u64Number of selected (positive-outcome) cases.
total: u64Total number of cases; the denominator of the selection rate.
Implementations§
Source§impl BinaryOutcomeCounts
impl BinaryOutcomeCounts
Sourcepub fn new(selected: u64, total: u64) -> StatsResult<Self>
pub fn new(selected: u64, total: u64) -> StatsResult<Self>
Builds a count pair and rejects impossible or empty totals.
Sourcepub fn selection_rate(self) -> f64
pub fn selection_rate(self) -> f64
Returns selected / total as an f64 rate.
Trait Implementations§
Source§impl Clone for BinaryOutcomeCounts
impl Clone for BinaryOutcomeCounts
Source§fn clone(&self) -> BinaryOutcomeCounts
fn clone(&self) -> BinaryOutcomeCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BinaryOutcomeCounts
Source§impl Debug for BinaryOutcomeCounts
impl Debug for BinaryOutcomeCounts
Source§impl PartialEq for BinaryOutcomeCounts
impl PartialEq for BinaryOutcomeCounts
Source§fn eq(&self, other: &BinaryOutcomeCounts) -> bool
fn eq(&self, other: &BinaryOutcomeCounts) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BinaryOutcomeCounts
Auto Trait Implementations§
impl Freeze for BinaryOutcomeCounts
impl RefUnwindSafe for BinaryOutcomeCounts
impl Send for BinaryOutcomeCounts
impl Sync for BinaryOutcomeCounts
impl Unpin for BinaryOutcomeCounts
impl UnsafeUnpin for BinaryOutcomeCounts
impl UnwindSafe for BinaryOutcomeCounts
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