pub struct Window<const D: usize> { /* private fields */ }
Expand description
A window of block SFS estimates, used in window EM.
As part of the window EM algorithm, “windows” of block estimates are averaged out to give a running estimate of the SFS. The “window size” governs the number of past block estimates that are remembered and averaged over.
Implementations§
Source§impl<const D: usize> Window<D>
impl<const D: usize> Window<D>
Sourcepub fn from_initial(initial: USfs<D>, window_size: usize) -> Self
pub fn from_initial(initial: USfs<D>, window_size: usize) -> Self
Creates a new window of with size window_size
by repeating a provided SFS.
Sourcepub fn from_zeros(shape: [usize; D], window_size: usize) -> Self
pub fn from_zeros(shape: [usize; D], window_size: usize) -> Self
Creates a new window of zero-initialised SFS with size window_size
.
Sourcepub fn window_size(&self) -> usize
pub fn window_size(&self) -> usize
Returns the window size, corresponding to the number of past block estimates in the window.
Trait Implementations§
impl<const D: usize> StructuralPartialEq for Window<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for Window<D>
impl<const D: usize> RefUnwindSafe for Window<D>
impl<const D: usize> Send for Window<D>
impl<const D: usize> Sync for Window<D>
impl<const D: usize> Unpin for Window<D>
impl<const D: usize> UnwindSafe for Window<D>
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