Struct rv::data::BernoulliSuffStat
source · pub struct BernoulliSuffStat { /* private fields */ }
Expand description
Sufficient statistic for the Bernoulli distribution.
Contains the number of trials and the number of successes.
Implementations§
source§impl BernoulliSuffStat
impl BernoulliSuffStat
sourcepub fn from_parts_unchecked(n: usize, k: usize) -> Self
pub fn from_parts_unchecked(n: usize, k: usize) -> Self
Create a sufficient statistic from components without checking whether they are valid.
Trait Implementations§
source§impl Clone for BernoulliSuffStat
impl Clone for BernoulliSuffStat
source§fn clone(&self) -> BernoulliSuffStat
fn clone(&self) -> BernoulliSuffStat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BernoulliSuffStat
impl Debug for BernoulliSuffStat
source§impl Default for BernoulliSuffStat
impl Default for BernoulliSuffStat
source§impl<'de> Deserialize<'de> for BernoulliSuffStat
impl<'de> Deserialize<'de> for BernoulliSuffStat
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, X> From<&'a BernoulliSuffStat> for DataOrSuffStat<'a, X, Bernoulli>where
X: Booleable,
impl<'a, X> From<&'a BernoulliSuffStat> for DataOrSuffStat<'a, X, Bernoulli>where
X: Booleable,
source§fn from(stat: &'a BernoulliSuffStat) -> Self
fn from(stat: &'a BernoulliSuffStat) -> Self
Converts to this type from the input type.
source§impl PartialEq for BernoulliSuffStat
impl PartialEq for BernoulliSuffStat
source§fn eq(&self, other: &BernoulliSuffStat) -> bool
fn eq(&self, other: &BernoulliSuffStat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BernoulliSuffStat
impl Serialize for BernoulliSuffStat
source§impl<X: Booleable> SuffStat<X> for BernoulliSuffStat
impl<X: Booleable> SuffStat<X> for BernoulliSuffStat
source§fn observe_many(&mut self, xs: &[X])
fn observe_many(&mut self, xs: &[X])
Assimilate several observations
source§fn forget_many(&mut self, xs: &[X])
fn forget_many(&mut self, xs: &[X])
Forget several observations
impl Eq for BernoulliSuffStat
impl StructuralPartialEq for BernoulliSuffStat
Auto Trait Implementations§
impl Freeze for BernoulliSuffStat
impl RefUnwindSafe for BernoulliSuffStat
impl Send for BernoulliSuffStat
impl Sync for BernoulliSuffStat
impl Unpin for BernoulliSuffStat
impl UnwindSafe for BernoulliSuffStat
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.