pub struct Pascal {
pub r: usize,
pub x: Vec<usize>,
pub p: f64,
}Expand description
Handles Negative Binomial (Pascal) distributions tracking total required iterations up until target success thresholds are passed.
Fields§
§r: usizeTarget number of total successes required ($r$).
x: Vec<usize>Vector tracking total numbers of executed trials ($x$).
p: f64Probability of success on an isolated trial ($p$).
Implementations§
Source§impl Pascal
impl Pascal
pub fn new(r: usize, x: Vec<usize>, p: f64) -> Self
Sourcepub fn get_probability_set(&self) -> CDHResult<Vec<f64>>
pub fn get_probability_set(&self) -> CDHResult<Vec<f64>>
Computes the structural parameters mapping points via the Negative Binomial equation engine.
pub fn mean(&self) -> CDHResult<f64>
pub fn variance(&self) -> CDHResult<f64>
Auto Trait Implementations§
impl Freeze for Pascal
impl RefUnwindSafe for Pascal
impl Send for Pascal
impl Sync for Pascal
impl Unpin for Pascal
impl UnwindSafe for Pascal
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