pub struct TruncatedCategorical {
pub ln_ps: Vec<f64>,
/* private fields */
}
Fields§
§ln_ps: Vec<f64>
Implementations§
Trait Implementations§
source§impl Clone for TruncatedCategorical
impl Clone for TruncatedCategorical
source§fn clone(&self) -> TruncatedCategorical
fn clone(&self) -> TruncatedCategorical
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 TruncatedCategorical
impl Debug for TruncatedCategorical
source§impl PartialEq for TruncatedCategorical
impl PartialEq for TruncatedCategorical
source§fn eq(&self, other: &TruncatedCategorical) -> bool
fn eq(&self, other: &TruncatedCategorical) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TruncatedCategorical
impl PartialOrd for TruncatedCategorical
source§fn partial_cmp(&self, other: &TruncatedCategorical) -> Option<Ordering>
fn partial_cmp(&self, other: &TruncatedCategorical) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TruncatedDistribution for TruncatedCategorical
impl TruncatedDistribution for TruncatedCategorical
source§fn quantile(&self, cp: f64) -> (i64, f64)
fn quantile(&self, cp: f64) -> (i64, f64)
Given a cumulative probability [0-1), return the category/bin in
which it falls (intervals are inclusive of lower-bound,
exclusive of upper-bount, i.e. [lo,hi)
). Cumulative
probability is counted from self.lo_split (our zero) up to
self.hi_split (our one). Returns the index of the bin and where
(as a ratio) the cumulative probability falls within that
bin. Ratio on lo and hi bounds are counted relative to their
respective prior split.
source§fn is_resolved(&self) -> bool
fn is_resolved(&self) -> bool
Assumes input is trimmed
impl StructuralPartialEq for TruncatedCategorical
Auto Trait Implementations§
impl Freeze for TruncatedCategorical
impl RefUnwindSafe for TruncatedCategorical
impl Send for TruncatedCategorical
impl Sync for TruncatedCategorical
impl Unpin for TruncatedCategorical
impl UnwindSafe for TruncatedCategorical
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.