pub struct Binomial {
pub n: u64,
pub p: f64,
}Expand description
The binomial distribution B(n, p) (SciPy’s binom(n, p)).
Fields§
§n: u64§p: f64Implementations§
Trait Implementations§
impl Copy for Binomial
Source§impl DiscreteDistribution for Binomial
impl DiscreteDistribution for Binomial
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,
impl StructuralPartialEq for Binomial
Auto Trait Implementations§
impl Freeze for Binomial
impl RefUnwindSafe for Binomial
impl Send for Binomial
impl Sync for Binomial
impl Unpin for Binomial
impl UnsafeUnpin for Binomial
impl UnwindSafe for Binomial
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