pub struct ZipEq<Rows, Cols, Head: MatShape<Rows = Rows, Cols = Cols>, Tail: MatShape<Rows = Rows, Cols = Cols>>(/* private fields */);
Expand description
Zipped matrix views.
Implementations§
Source§impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MatShape<Rows = Rows, Cols = Cols>, Tail: MatShape<Rows = Rows, Cols = Cols>> ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MatShape<Rows = Rows, Cols = Cols>, Tail: MatShape<Rows = Rows, Cols = Cols>> ZipEq<Rows, Cols, Head, Tail>
Sourcepub fn new(head: Head, tail: Tail) -> Self
pub fn new(head: Head, tail: Tail) -> Self
Creates a zipped matrix, after asserting that the dimensions match.
Sourcepub fn new_unchecked(head: Head, tail: Tail) -> Self
pub fn new_unchecked(head: Head, tail: Tail) -> Self
Creates a zipped matrix, assuming that the dimensions match.
Source§impl<Head: for<'a> MatIndex<'a, Rows = (), Cols = usize, Index = ((), usize), LayoutTransform = VecLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = (), Cols = usize, Index = ((), usize), LayoutTransform = VecLayoutTransform>> ZipEq<(), usize, Head, Tail>
impl<Head: for<'a> MatIndex<'a, Rows = (), Cols = usize, Index = ((), usize), LayoutTransform = VecLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = (), Cols = usize, Index = ((), usize), LayoutTransform = VecLayoutTransform>> ZipEq<(), usize, Head, Tail>
Source§impl<Head: for<'a> MatIndex<'a, Rows = usize, Cols = (), Index = (usize, ()), LayoutTransform = VecLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = usize, Cols = (), Index = (usize, ()), LayoutTransform = VecLayoutTransform>> ZipEq<usize, (), Head, Tail>
impl<Head: for<'a> MatIndex<'a, Rows = usize, Cols = (), Index = (usize, ()), LayoutTransform = VecLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = usize, Cols = (), Index = (usize, ()), LayoutTransform = VecLayoutTransform>> ZipEq<usize, (), Head, Tail>
Source§impl<Head: for<'a> MatIndex<'a, Rows = usize, Cols = usize, Index = (usize, usize), LayoutTransform = MatLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = usize, Cols = usize, Index = (usize, usize), LayoutTransform = MatLayoutTransform>> ZipEq<usize, usize, Head, Tail>
impl<Head: for<'a> MatIndex<'a, Rows = usize, Cols = usize, Index = (usize, usize), LayoutTransform = MatLayoutTransform>, Tail: for<'a> MatIndex<'a, Rows = usize, Cols = usize, Index = (usize, usize), LayoutTransform = MatLayoutTransform>> ZipEq<usize, usize, Head, Tail>
Sourcepub fn for_each(self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item))
pub fn for_each(self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item))
Applies f
to each element of self
.
Sourcepub fn for_each_triangular_lower(
self,
diag: Diag,
f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item),
)
pub fn for_each_triangular_lower( self, diag: Diag, f: impl for<'a> FnMut(<Self 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<Rows: Clone, Cols: Clone, Head: Clone + MatShape<Rows = Rows, Cols = Cols>, Tail: Clone + MatShape<Rows = Rows, Cols = Cols>> Clone for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Clone, Cols: Clone, Head: Clone + MatShape<Rows = Rows, Cols = Cols>, Tail: Clone + MatShape<Rows = Rows, Cols = Cols>> Clone for ZipEq<Rows, Cols, Head, Tail>
Source§impl<Rows: Debug, Cols: Debug, Head: Debug + MatShape<Rows = Rows, Cols = Cols>, Tail: Debug + MatShape<Rows = Rows, Cols = Cols>> Debug for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Debug, Cols: Debug, Head: Debug + MatShape<Rows = Rows, Cols = Cols>, Tail: Debug + MatShape<Rows = Rows, Cols = Cols>> Debug for ZipEq<Rows, Cols, Head, Tail>
Source§impl<'a, Rows: Copy + Eq, Cols: Copy + Eq, Head: MatIndex<'a, Rows = Rows, Cols = Cols>, Tail: MatIndex<'a, Rows = Rows, Cols = Cols, Index = Head::Index, LayoutTransform = Head::LayoutTransform>> MatIndex<'a> for ZipEq<Rows, Cols, Head, Tail>
impl<'a, Rows: Copy + Eq, Cols: Copy + Eq, Head: MatIndex<'a, Rows = Rows, Cols = Cols>, Tail: MatIndex<'a, Rows = Rows, Cols = Cols, Index = Head::Index, LayoutTransform = Head::LayoutTransform>> MatIndex<'a> for ZipEq<Rows, Cols, Head, Tail>
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: Self::Index) -> Self::Item
unsafe fn get_unchecked(&'a mut self, index: Self::Index) -> Self::Item
Get the item at the given index, skipping bound checks.
Source§unsafe fn get_from_slice_unchecked(
slice: &'a mut Self::Slice,
idx: usize,
) -> Self::Item
unsafe fn get_from_slice_unchecked( slice: &'a mut Self::Slice, idx: usize, ) -> Self::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) -> Self::LayoutTransform
fn preferred_layout(&self) -> Self::LayoutTransform
Computes the preferred iteration layout of the matrices.
Source§fn with_layout(self, layout: Self::LayoutTransform) -> Self
fn with_layout(self, layout: Self::LayoutTransform) -> Self
Applies the layout transformation to the matrices.
Source§impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MatShape<Rows = Rows, Cols = Cols>, Tail: MatShape<Rows = Rows, Cols = Cols>> MatShape for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MatShape<Rows = Rows, Cols = Cols>, Tail: MatShape<Rows = Rows, Cols = Cols>> MatShape for ZipEq<Rows, Cols, Head, Tail>
Source§impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MaybeContiguous<Rows = Rows, Cols = Cols>, Tail: MaybeContiguous<Rows = Rows, Cols = Cols, Index = Head::Index, LayoutTransform = Head::LayoutTransform>> MaybeContiguous for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Copy + Eq, Cols: Copy + Eq, Head: MaybeContiguous<Rows = Rows, Cols = Cols>, Tail: MaybeContiguous<Rows = Rows, Cols = Cols, Index = Head::Index, LayoutTransform = Head::LayoutTransform>> MaybeContiguous for ZipEq<Rows, Cols, Head, Tail>
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.
impl<Rows: Copy, Cols: Copy, Head: Copy + MatShape<Rows = Rows, Cols = Cols>, Tail: Copy + MatShape<Rows = Rows, Cols = Cols>> 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