pub struct WindowEm<const D: usize, T> { /* private fields */ }
Expand description
A runner of the window EM algorithm.
The window EM algorithm updates the SFS estimate in smaller blocks of data, leading to multiple
updates to the estimate per full EM-step. These block estimates are averaged over a sliding
window to smooth the global estimate. The algorithm can be configured to use different EM-like
algorithms (corresponding to the parameter T
) for each inner block update step.
Implementations§
Source§impl<const D: usize, T> WindowEm<D, T>
impl<const D: usize, T> WindowEm<D, T>
Sourcepub fn new(em: T, window: Window<D>, block_size: usize) -> Self
pub fn new(em: T, window: Window<D>, block_size: usize) -> Self
Returns a new instance of the runner.
The em
is the inner kind of EM to handle the blocks, and the block_size
is the number
of sites per blocks. The provided window
should match the shape of the input and SFS
that is provided for inference later. Where no good prior guess for the SFS exists,
using Window::from_zeros
is recommended.
Trait Implementations§
Source§impl<const D: usize, I, T> Em<D, I> for WindowEm<D, T>
impl<const D: usize, I, T> Em<D, I> for WindowEm<D, T>
Source§impl<const D: usize, R, T> StreamingEm<D, R> for WindowEm<D, T>
impl<const D: usize, R, T> StreamingEm<D, R> for WindowEm<D, T>
impl<const D: usize, T> StructuralPartialEq for WindowEm<D, T>
Auto Trait Implementations§
impl<const D: usize, T> Freeze for WindowEm<D, T>where
T: Freeze,
impl<const D: usize, T> RefUnwindSafe for WindowEm<D, T>where
T: RefUnwindSafe,
impl<const D: usize, T> Send for WindowEm<D, T>where
T: Send,
impl<const D: usize, T> Sync for WindowEm<D, T>where
T: Sync,
impl<const D: usize, T> Unpin for WindowEm<D, T>where
T: Unpin,
impl<const D: usize, T> UnwindSafe for WindowEm<D, T>where
T: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more