pub struct NegativeBinomial {
pub r: f64,
pub p: f64,
}Expand description
The negative binomial distribution of the number of failures before the r-th success
(SciPy’s nbinom(n=r, p)); r need not be an integer.
Fields§
§r: f64§p: f64Implementations§
Trait Implementations§
Source§impl Clone for NegativeBinomial
impl Clone for NegativeBinomial
impl Copy for NegativeBinomial
Source§impl Debug for NegativeBinomial
impl Debug for NegativeBinomial
Source§impl DiscreteDistribution for NegativeBinomial
impl DiscreteDistribution for NegativeBinomial
fn pmf(&self, k: i64) -> f64
fn logpmf(&self, k: i64) -> f64
fn sf(&self, k: i64) -> f64
fn support(&self) -> (i64, i64)
fn mean(&self) -> f64
fn variance(&self) -> f64
fn skewness(&self) -> f64
fn excess_kurtosis(&self) -> f64
fn log_likelihood(&self, data: &[i64]) -> f64
fn sample<U: UniformGenerator>(&self, rng: &mut U) -> i64where
Self: Sized,
Source§impl PartialEq for NegativeBinomial
impl PartialEq for NegativeBinomial
impl StructuralPartialEq for NegativeBinomial
Auto Trait Implementations§
impl Freeze for NegativeBinomial
impl RefUnwindSafe for NegativeBinomial
impl Send for NegativeBinomial
impl Sync for NegativeBinomial
impl Unpin for NegativeBinomial
impl UnsafeUnpin for NegativeBinomial
impl UnwindSafe for NegativeBinomial
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