pub struct ZipEq<Rows, Cols, Head, Tail>(/* private fields */)
where
Head: MatShape<Rows = Rows, Cols = Cols>,
Tail: MatShape<Rows = Rows, Cols = Cols>;Expand description
Zipped matrix views.
Implementations§
source§impl<Head, Tail> ZipEq<(), usize, Head, Tail>
impl<Head, Tail> ZipEq<(), usize, Head, Tail>
sourcepub fn for_each(
self,
f: impl for<'a> FnMut(<ZipEq<(), usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each( self, f: impl for<'a> FnMut(<ZipEq<(), usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of self.
source§impl<Head, Tail> ZipEq<usize, (), Head, Tail>
impl<Head, Tail> ZipEq<usize, (), Head, Tail>
sourcepub fn for_each(
self,
f: impl for<'a> FnMut(<ZipEq<usize, (), Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each( self, f: impl for<'a> FnMut(<ZipEq<usize, (), Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of self.
source§impl<Head, Tail> ZipEq<usize, usize, Head, Tail>
impl<Head, Tail> ZipEq<usize, usize, Head, Tail>
sourcepub fn for_each(
self,
f: impl for<'a> FnMut(<ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each( self, f: impl for<'a> FnMut(<ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of self.
sourcepub fn for_each_with_index(
self,
f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each_with_index( self, f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of self, while passing the indices of the position of the
current element.
sourcepub fn for_each_triangular_lower_with_index(
self,
diag: Diag,
f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each_triangular_lower_with_index( self, diag: Diag, f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of the lower triangular half of self, while passing the
indices of the position of the current element.
diag specifies whether the diagonal should be included or excluded.
sourcepub fn for_each_triangular_upper_with_index(
self,
diag: Diag,
f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each_triangular_upper_with_index( self, diag: Diag, f: impl for<'a> FnMut(usize, usize, <ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of the upper triangular half of self, while passing the
indices of the position of the current element.
diag specifies whether the diagonal should be included or excluded.
sourcepub fn for_each_triangular_lower(
self,
diag: Diag,
f: impl for<'a> FnMut(<ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item),
)
pub fn for_each_triangular_lower( self, diag: Diag, f: impl for<'a> FnMut(<ZipEq<usize, usize, Head, Tail> as MatIndex<'a>>::Item), )
Applies f to each element of the lower triangular half of self.
diag specifies whether the diagonal should be included or excluded.
Trait Implementations§
source§impl<'a, Rows, Cols, Head, Tail> MatIndex<'a> for ZipEq<Rows, Cols, Head, Tail>where
Rows: Debug + Copy + Eq,
Cols: Copy + Eq + Debug,
Head: MatIndex<'a, Rows = Rows, Cols = Cols>,
Tail: MatIndex<'a, Rows = Rows, Cols = Cols, Index = <Head as MaybeContiguous>::Index, LayoutTransform = <Head as MaybeContiguous>::LayoutTransform>,
impl<'a, Rows, Cols, Head, Tail> MatIndex<'a> for ZipEq<Rows, Cols, Head, Tail>where
Rows: Debug + Copy + Eq,
Cols: Copy + Eq + Debug,
Head: MatIndex<'a, Rows = Rows, Cols = Cols>,
Tail: MatIndex<'a, Rows = Rows, Cols = Cols, Index = <Head as MaybeContiguous>::Index, LayoutTransform = <Head as MaybeContiguous>::LayoutTransform>,
§type Item = Zip<<Head as MatIndex<'a>>::Item, <Tail as MatIndex<'a>>::Item>
type Item = Zip<<Head as MatIndex<'a>>::Item, <Tail as MatIndex<'a>>::Item>
Item produced by the zipped views.
source§unsafe fn get_unchecked(
&'a mut self,
index: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Index,
) -> <ZipEq<Rows, Cols, Head, Tail> as MatIndex<'a>>::Item
unsafe fn get_unchecked( &'a mut self, index: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Index, ) -> <ZipEq<Rows, Cols, Head, Tail> as MatIndex<'a>>::Item
Get the item at the given index, skipping bound checks.
source§unsafe fn get_from_slice_unchecked(
slice: &'a mut <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Slice,
idx: usize,
) -> <ZipEq<Rows, Cols, Head, Tail> as MatIndex<'a>>::Item
unsafe fn get_from_slice_unchecked( slice: &'a mut <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Slice, idx: usize, ) -> <ZipEq<Rows, Cols, Head, Tail> as MatIndex<'a>>::Item
Get the item at the given slice position, skipping bound checks.
source§fn is_contiguous(&self) -> bool
fn is_contiguous(&self) -> bool
Checks if the zipped matrices are contiguous.
source§fn preferred_layout(
&self,
) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform
fn preferred_layout( &self, ) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform
Computes the preferred iteration layout of the matrices.
source§fn with_layout(
self,
layout: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform,
) -> ZipEq<Rows, Cols, Head, Tail>
fn with_layout( self, layout: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform, ) -> ZipEq<Rows, Cols, Head, Tail>
Applies the layout transformation to the matrices.
source§impl<Rows, Cols, Head, Tail> MaybeContiguous for ZipEq<Rows, Cols, Head, Tail>where
Rows: Debug + Copy + Eq,
Cols: Copy + Eq + Debug,
Head: MaybeContiguous<Rows = Rows, Cols = Cols>,
Tail: MaybeContiguous<Rows = Rows, Cols = Cols, Index = <Head as MaybeContiguous>::Index, LayoutTransform = <Head as MaybeContiguous>::LayoutTransform>,
impl<Rows, Cols, Head, Tail> MaybeContiguous for ZipEq<Rows, Cols, Head, Tail>where
Rows: Debug + Copy + Eq,
Cols: Copy + Eq + Debug,
Head: MaybeContiguous<Rows = Rows, Cols = Cols>,
Tail: MaybeContiguous<Rows = Rows, Cols = Cols, Index = <Head as MaybeContiguous>::Index, LayoutTransform = <Head as MaybeContiguous>::LayoutTransform>,
§type Index = <Head as MaybeContiguous>::Index
type Index = <Head as MaybeContiguous>::Index
Indexing type.
§type Slice = Zip<<Head as MaybeContiguous>::Slice, <Tail as MaybeContiguous>::Slice>
type Slice = Zip<<Head as MaybeContiguous>::Slice, <Tail as MaybeContiguous>::Slice>
Contiguous slice type.
§type LayoutTransform = <Head as MaybeContiguous>::LayoutTransform
type LayoutTransform = <Head as MaybeContiguous>::LayoutTransform
Layout transformation type.
source§unsafe fn get_slice_unchecked(
&mut self,
idx: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Index,
n_elems: usize,
) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Slice
unsafe fn get_slice_unchecked( &mut self, idx: <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Index, n_elems: usize, ) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::Slice
Returns slice at index of length
n_elems.impl<Rows, Cols, Head, Tail> Copy for ZipEq<Rows, Cols, Head, Tail>
Auto Trait Implementations§
impl<Rows, Cols, Head, Tail> Freeze for ZipEq<Rows, Cols, Head, Tail>
impl<Rows, Cols, Head, Tail> RefUnwindSafe for ZipEq<Rows, Cols, Head, Tail>where
Head: RefUnwindSafe,
Tail: RefUnwindSafe,
impl<Rows, Cols, Head, Tail> Send for ZipEq<Rows, Cols, Head, Tail>
impl<Rows, Cols, Head, Tail> Sync for ZipEq<Rows, Cols, Head, Tail>
impl<Rows, Cols, Head, Tail> Unpin for ZipEq<Rows, Cols, Head, Tail>
impl<Rows, Cols, Head, Tail> UnwindSafe for ZipEq<Rows, Cols, Head, Tail>where
Head: UnwindSafe,
Tail: 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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