pub struct ZipEq<Rows, Cols, Head, Tail>(pub Head, pub Tail, _);Expand description
zipped matrices
Tuple Fields§
§0: Head§1: TailImplementations§
Source§impl<Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, Head: MatIndex<Rows = Rows, Cols = Cols>, Tail: MatIndex<Rows = Rows, Cols = Cols>> ZipEq<Rows, Cols, Head, Tail>
single matrix view
impl<Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, Head: MatIndex<Rows = Rows, Cols = Cols>, Tail: MatIndex<Rows = Rows, Cols = Cols>> ZipEq<Rows, Cols, Head, Tail>
single matrix view
Sourcepub fn new(head: Head, tail: Tail) -> Self
pub fn new(head: Head, tail: Tail) -> Self
creates a zip 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 zip matrix, assuming that the dimensions match
Source§impl<Rows: Shape, Cols: Shape, L: MatIndex<LayoutTransform = MatLayoutTransform, Rows = Rows, Cols = Cols, Index = (Idx<Rows>, Idx<Cols>)>, R: MatIndex<LayoutTransform = MatLayoutTransform, Rows = Rows, Cols = Cols, Index = (Idx<Rows>, Idx<Cols>)>> ZipEq<Rows, Cols, L, R>
impl<Rows: Shape, Cols: Shape, L: MatIndex<LayoutTransform = MatLayoutTransform, Rows = Rows, Cols = Cols, Index = (Idx<Rows>, Idx<Cols>)>, R: MatIndex<LayoutTransform = MatLayoutTransform, Rows = Rows, Cols = Cols, Index = (Idx<Rows>, Idx<Cols>)>> ZipEq<Rows, Cols, L, R>
Sourcepub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
pub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
applies f to each element of self
Sourcepub fn for_each_with_index(
self,
f: impl FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::Item),
)
pub fn for_each_with_index( self, f: impl FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::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 FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::Item),
)
pub fn for_each_triangular_lower_with_index( self, diag: Diag, f: impl FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::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 FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::Item),
)
pub fn for_each_triangular_upper_with_index( self, diag: Diag, f: impl FnMut(Idx<Rows>, Idx<Cols>, <Self as MatIndex>::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 FnMut(<Self as MatIndex>::Item),
)
pub fn for_each_triangular_lower( self, diag: Diag, f: impl FnMut(<Self as MatIndex>::Item), )
applies f to each element of the lower triangular half of self
diag specifies whether the diagonal should be included or excluded
Sourcepub fn for_each_triangular_upper(
self,
diag: Diag,
f: impl FnMut(<Self as MatIndex>::Item),
)
pub fn for_each_triangular_upper( self, diag: Diag, f: impl FnMut(<Self as MatIndex>::Item), )
applies f to each element of the upper triangular half of self
diag specifies whether the diagonal should be included or excluded
Source§impl<Rows: Shape, L: MatIndex<LayoutTransform = VecLayoutTransform, Rows = Rows, Cols = (), Index = Idx<Rows>>, R: MatIndex<LayoutTransform = VecLayoutTransform, Rows = Rows, Cols = (), Index = Idx<Rows>>> ZipEq<Rows, (), L, R>
impl<Rows: Shape, L: MatIndex<LayoutTransform = VecLayoutTransform, Rows = Rows, Cols = (), Index = Idx<Rows>>, R: MatIndex<LayoutTransform = VecLayoutTransform, Rows = Rows, Cols = (), Index = Idx<Rows>>> ZipEq<Rows, (), L, R>
Sourcepub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
pub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
applies f to each element of self
Sourcepub fn for_each_with_index(
self,
f: impl FnMut(Idx<Rows>, <Self as MatIndex>::Item),
)
pub fn for_each_with_index( self, f: impl FnMut(Idx<Rows>, <Self as MatIndex>::Item), )
applies f to each element of self, while passing the indices of the position of the
current element
Source§impl<Cols: Shape, L: MatIndex<LayoutTransform = VecLayoutTransform, Rows = (), Cols = Cols, Index = Idx<Cols>>, R: MatIndex<LayoutTransform = VecLayoutTransform, Rows = (), Cols = Cols, Index = Idx<Cols>>> ZipEq<(), Cols, L, R>
impl<Cols: Shape, L: MatIndex<LayoutTransform = VecLayoutTransform, Rows = (), Cols = Cols, Index = Idx<Cols>>, R: MatIndex<LayoutTransform = VecLayoutTransform, Rows = (), Cols = Cols, Index = Idx<Cols>>> ZipEq<(), Cols, L, R>
Sourcepub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
pub fn for_each(self, f: impl FnMut(<Self as MatIndex>::Item))
applies f to each element of self
Sourcepub fn for_each_with_index(
self,
f: impl FnMut(Idx<Cols>, <Self as MatIndex>::Item),
)
pub fn for_each_with_index( self, f: impl FnMut(Idx<Cols>, <Self as MatIndex>::Item), )
applies f to each element of self, while passing the indices of the position of the
current element
Trait Implementations§
Source§impl<Rows: Clone, Cols: Clone, Head: Clone, Tail: Clone> Clone for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Clone, Cols: Clone, Head: Clone, Tail: Clone> Clone for ZipEq<Rows, Cols, Head, Tail>
Source§impl<Rows: Debug, Cols: Debug, Head: Debug, Tail: Debug> Debug for ZipEq<Rows, Cols, Head, Tail>
impl<Rows: Debug, Cols: Debug, Head: Debug, Tail: Debug> Debug for ZipEq<Rows, Cols, Head, Tail>
Source§impl<Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, L: MatIndex<Rows = Rows, Cols = Cols>, R: MatIndex<Rows = Rows, Cols = Cols, Index = L::Index, LayoutTransform = L::LayoutTransform>> MatIndex for ZipEq<Rows, Cols, L, R>
impl<Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, L: MatIndex<Rows = Rows, Cols = Cols>, R: MatIndex<Rows = Rows, Cols = Cols, Index = L::Index, LayoutTransform = L::LayoutTransform>> MatIndex for ZipEq<Rows, Cols, L, R>
Source§type Dyn = ZipEq<<<L as MatIndex>::Dyn as MatIndex>::Rows, <<L as MatIndex>::Dyn as MatIndex>::Cols, <L as MatIndex>::Dyn, <R as MatIndex>::Dyn>
type Dyn = ZipEq<<<L as MatIndex>::Dyn as MatIndex>::Rows, <<L as MatIndex>::Dyn as MatIndex>::Cols, <L as MatIndex>::Dyn, <R as MatIndex>::Dyn>
Source§type LayoutTransform = <L as MatIndex>::LayoutTransform
type LayoutTransform = <L as MatIndex>::LayoutTransform
type Slice = Zip<<L as MatIndex>::Slice, <R as MatIndex>::Slice>
Source§unsafe fn get_slice_unchecked<'a>(
this: &'a mut Self,
idx: Self::Index,
n_elems: usize,
) -> <Self::Slice as SliceFamily<'a, Self::Item>>::Slice
unsafe fn get_slice_unchecked<'a>( this: &'a mut Self, idx: Self::Index, n_elems: usize, ) -> <Self::Slice as SliceFamily<'a, Self::Item>>::Slice
n_elemsSource§unsafe fn from_dyn_idx(idx: <Self::Dyn as MatIndex>::Index) -> Self::Index
unsafe fn from_dyn_idx(idx: <Self::Dyn as MatIndex>::Index) -> Self::Index
Source§unsafe fn get_unchecked(this: &mut Self, index: Self::Index) -> Self::Item
unsafe fn get_unchecked(this: &mut Self, index: Self::Index) -> Self::Item
Source§unsafe fn next_unchecked<'a>(
slice: &mut <Self::Slice as SliceFamily<'a, Self::Item>>::Slice,
) -> Self::Item
unsafe fn next_unchecked<'a>( slice: &mut <Self::Slice as SliceFamily<'a, Self::Item>>::Slice, ) -> Self::Item
Source§fn is_contiguous(this: &Self) -> bool
fn is_contiguous(this: &Self) -> bool
Source§fn preferred_layout(this: &Self) -> Self::LayoutTransform
fn preferred_layout(this: &Self) -> Self::LayoutTransform
Source§fn with_layout(this: Self, layout: Self::LayoutTransform) -> Self::Dyn
fn with_layout(this: Self, layout: Self::LayoutTransform) -> Self::Dyn
impl<Rows: Copy, Cols: Copy, Head: Copy, Tail: Copy> 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>
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>
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§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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