Skip to main content

MatIndex

Trait MatIndex 

Source
pub unsafe trait MatIndex<'a, _Outlives = &'a Self>: MaybeContiguous {
    type Item;

    // Required methods
    unsafe fn get_unchecked(&'a mut self, index: Self::Index) -> Self::Item;
    unsafe fn get_from_slice_unchecked(
        slice: &'a mut Self::Slice,
        idx: usize,
    ) -> Self::Item;
    fn is_contiguous(&self) -> bool;
    fn preferred_layout(&self) -> Self::LayoutTransform;
    fn with_layout(self, layout: Self::LayoutTransform) -> Self;
}
Expand description

Zipped matrix views.

Required Associated Types§

Source

type Item

Item produced by the zipped views.

Required Methods§

Source

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

Get the item at the given slice position, skipping bound checks.

Source

fn is_contiguous(&self) -> bool

Checks if the zipped matrices are contiguous.

Source

fn preferred_layout(&self) -> Self::LayoutTransform

Computes the preferred iteration layout of the matrices.

Source

fn with_layout(self, layout: Self::LayoutTransform) -> Self

Applies the layout transformation to the matrices.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, E: Entity> MatIndex<'a> for ColMut<'_, E>

Source§

type Item = ReadWrite<'a, E>

Source§

impl<'a, E: Entity> MatIndex<'a> for ColRef<'_, E>

Source§

type Item = Read<'a, E>

Source§

impl<'a, E: Entity> MatIndex<'a> for MatMut<'_, E>

Source§

type Item = ReadWrite<'a, E>

Source§

impl<'a, E: Entity> MatIndex<'a> for MatRef<'_, E>

Source§

type Item = Read<'a, E>

Source§

impl<'a, E: Entity> MatIndex<'a> for RowMut<'_, E>

Source§

type Item = ReadWrite<'a, E>

Source§

impl<'a, E: Entity> MatIndex<'a> for RowRef<'_, E>

Source§

type Item = Read<'a, E>

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>

Source§

type Item = Zip<<Head as MatIndex<'a>>::Item, <Tail as MatIndex<'a>>::Item>

Source§

impl<'a, Rows: Copy + Eq, Cols: Copy + Eq, Mat: MatIndex<'a, Rows = Rows, Cols = Cols>> MatIndex<'a> for LastEq<Rows, Cols, Mat>

Source§

type Item = Last<<Mat as MatIndex<'a>>::Item>