pub struct ZipEq<Rows, Cols, Head, Tail>(Head, Tail)
where
Head: MatShape<Rows = Rows, Cols = Cols>,
Tail: MatShape<Rows = Rows, Cols = Cols>;
Expand description
Zipped matrix views.
Tuple Fields§
§0: Head
§1: Tail
Implementations§
§impl<Rows, Cols, Head, Tail> ZipEq<Rows, Cols, Head, Tail>
impl<Rows, Cols, Head, Tail> ZipEq<Rows, Cols, Head, Tail>
pub fn new(head: Head, tail: Tail) -> ZipEq<Rows, Cols, Head, Tail>
pub fn new(head: Head, tail: Tail) -> ZipEq<Rows, Cols, Head, Tail>
Creates a zipped matrix, after asserting that the dimensions match.
pub fn new_unchecked(head: Head, tail: Tail) -> ZipEq<Rows, Cols, Head, Tail>
pub fn new_unchecked(head: Head, tail: Tail) -> ZipEq<Rows, Cols, Head, Tail>
Creates a zipped matrix, assuming that the dimensions match.
§impl<Head, Tail> ZipEq<(), usize, Head, Tail>
impl<Head, Tail> ZipEq<(), usize, Head, Tail>
pub 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
.
§impl<Head, Tail> ZipEq<usize, (), Head, Tail>
impl<Head, Tail> ZipEq<usize, (), Head, Tail>
pub 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
.
§impl<Head, Tail> ZipEq<usize, usize, Head, Tail>
impl<Head, Tail> ZipEq<usize, usize, Head, Tail>
pub 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
.
pub 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.
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),
)
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.
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),
)
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.
pub 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§
§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>
§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
§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
§fn is_contiguous(&self) -> bool
fn is_contiguous(&self) -> bool
§fn preferred_layout(
&self,
) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform
fn preferred_layout( &self, ) -> <ZipEq<Rows, Cols, Head, Tail> as MaybeContiguous>::LayoutTransform
§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>
§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
§type Slice = Zip<<Head as MaybeContiguous>::Slice, <Tail as MaybeContiguous>::Slice>
type Slice = Zip<<Head as MaybeContiguous>::Slice, <Tail as MaybeContiguous>::Slice>
§type LayoutTransform = <Head as MaybeContiguous>::LayoutTransform
type LayoutTransform = <Head as MaybeContiguous>::LayoutTransform
§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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
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> ⓘ
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