EmStep

Trait EmStep 

Source
pub trait EmStep: Sized {
    type Status;

    // Provided method
    fn inspect<const N: usize, F>(self, f: F) -> Inspect<Self, F>
       where F: FnMut(&Self, &Self::Status, &USfs<N>) { ... }
}
Expand description

An EM-like type that runs in steps.

This serves as a supertrait bound for both Em and StreamingEm and gathers behaviour shared around running consecutive EM-steps.

Required Associated Types§

Source

type Status

The status returned after each step.

This may be used, for example, to determine convergence by the stopping rule, or can be logged using EmStep::inspect. An example of a status might be the log-likelihood of the data given the SFS after the E-step.

Provided Methods§

Source

fn inspect<const N: usize, F>(self, f: F) -> Inspect<Self, F>
where F: FnMut(&Self, &Self::Status, &USfs<N>),

Inspect the status after each E-step.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, F> EmStep for Inspect<T, F>
where T: EmStep,

Source§

impl<const D: usize, T> EmStep for WindowEm<D, T>
where T: EmStep,

Source§

impl<const PAR: bool> EmStep for StandardEm<PAR>