pub struct Windows { /* private fields */ }Expand description
Windows over the leading axes of an array of one shape: a WindowAxis for each, and the lengths that windowed gives, the frame that counts the windows along each axis followed by the shape of one window.
Implementations§
Source§impl Windows
impl Windows
Sourcepub fn new(
sizes: &[i64],
moves: &[i64],
edge: impl Fn(Count) -> Option<Edge>,
shape: &[usize],
) -> Result<Self, Error>
pub fn new( sizes: &[i64], moves: &[i64], edge: impl Fn(Count) -> Option<Edge>, shape: &[usize], ) -> Result<Self, Error>
The windows of sizes and moves over the leading axes of shape. Each size is a Count: its magnitude is the window’s size, and edge gives the edge mode of its axis from it, or None for an axis that doesn’t pad. An axis with no move moves by 1.
Sourcepub fn cell(&self) -> &[usize]
pub fn cell(&self) -> &[usize]
The shape of one window: the windows’ sizes, then the argument’s remaining axes.
Sourcepub fn padding(&self) -> Option<Plan>
pub fn padding(&self) -> Option<Plan>
The plan that pads each padded axis by its edge mode, or None when no axis pads or there are no windows (window_padding_steps). Each padded axis of the result holds only the positions its windows read, and the result’s unpadded windows are the padded windows of the argument.
Sourcepub fn plan(&self, layout: &Layout, source: &[usize]) -> Result<Plan, Error>
pub fn plan(&self, layout: &Layout, source: &[usize]) -> Result<Plan, Error>
The plan of every window over layout, which has the windows’ shape: the frame’s axes, then each window’s axes. The windows read an array of shape source: layout’s shape, or the shape of padding’s result. The frame’s axes have the keys that frame_keys gives, and each window’s the keys that cell_keys gives.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Windows
impl Freeze for Windows
impl RefUnwindSafe for Windows
impl Send for Windows
impl Sync for Windows
impl Unpin for Windows
impl UnsafeUnpin for Windows
impl UnwindSafe for Windows
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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