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>,
Source§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>,
Source§type Index = <Head as MaybeContiguous>::Index
type Index = <Head as MaybeContiguous>::Index
Indexing type.
Source§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.
Source§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§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