pub struct BurstModel { /* private fields */ }Expand description
Online Gilbert-Elliott fit from the binary loss trace.
Implementations§
Source§impl BurstModel
impl BurstModel
pub fn new() -> Self
Sourcepub fn observe(&mut self, lost: bool)
pub fn observe(&mut self, lost: bool)
Fold one loss-trace sample: true = the packet/shard was lost.
Sourcepub fn fit(&self) -> Option<(f64, f64)>
pub fn fit(&self) -> Option<(f64, f64)>
Fitted (p, r) transition probabilities, or None before a trustworthy
fit.
Sourcepub fn mean_burst_len(&self) -> Option<f64>
pub fn mean_burst_len(&self) -> Option<f64>
Mean burst length 1 / r (consecutive losses), or None before a fit.
Sourcepub fn steady_loss(&self) -> Option<f64>
pub fn steady_loss(&self) -> Option<f64>
Steady-state loss p / (p + r) (equals the marginal loss rate by
construction), or None before a fit.
Trait Implementations§
Source§impl Clone for BurstModel
impl Clone for BurstModel
Source§fn clone(&self) -> BurstModel
fn clone(&self) -> BurstModel
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 moreSource§impl Debug for BurstModel
impl Debug for BurstModel
Source§impl Default for BurstModel
impl Default for BurstModel
Source§fn default() -> BurstModel
fn default() -> BurstModel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BurstModel
impl RefUnwindSafe for BurstModel
impl Send for BurstModel
impl Sync for BurstModel
impl Unpin for BurstModel
impl UnsafeUnpin for BurstModel
impl UnwindSafe for BurstModel
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