Trait faer::linalg::zip::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Item = ReadWrite<'a, E>

source§

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

§

type Item = Read<'a, E>

source§

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

§

type Item = ReadWrite<'a, E>

source§

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

§

type Item = Read<'a, E>

source§

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

§

type Item = ReadWrite<'a, E>

source§

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

§

type Item = Read<'a, E>

source§

impl<'a, Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, 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>

§

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

source§

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

§

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