pub enum DurationDistrib {
Poisson {
lambda: f64,
},
Geometric {
p: f64,
},
Histogram {
probs: Vec<f64>,
},
}Expand description
Duration distribution for a single state.
All distributions are truncated to max_dur in the forward-backward
algorithm; max_dur is passed as an argument to prob / log_prob to
facilitate normalisation where needed.
Variants§
Poisson
Poisson duration: P(dur = τ) ∝ λ^τ exp(−λ) / τ!, τ ≥ 1. Truncated and renormalised over τ = 1..max_dur.
Geometric
Geometric: P(dur = τ) = p · (1−p)^{τ−1}, τ ≥ 1.
Histogram
Histogram: probs[τ−1] = P(dur = τ), τ = 1..len.
Implementations§
Trait Implementations§
Source§impl Clone for DurationDistrib
impl Clone for DurationDistrib
Source§fn clone(&self) -> DurationDistrib
fn clone(&self) -> DurationDistrib
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DurationDistrib
impl RefUnwindSafe for DurationDistrib
impl Send for DurationDistrib
impl Sync for DurationDistrib
impl Unpin for DurationDistrib
impl UnsafeUnpin for DurationDistrib
impl UnwindSafe for DurationDistrib
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