extendr_api::prelude::modules::core::zip

Trait MaybeContiguous

pub unsafe trait MaybeContiguous: MatShape {
    type Index: Copy;
    type Slice;
    type LayoutTransform: Copy;

    // Required method
    unsafe fn get_slice_unchecked(
        &mut self,
        idx: Self::Index,
        n_elems: usize,
    ) -> Self::Slice;
}
Expand description

Zipped matrix views.

Required Associated Types§

type Index: Copy

Indexing type.

type Slice

Contiguous slice type.

type LayoutTransform: Copy

Layout transformation type.

Required Methods§

unsafe fn get_slice_unchecked( &mut self, idx: Self::Index, n_elems: usize, ) -> Self::Slice

Returns slice at index of length n_elems.

Implementors§

§

impl<E> MaybeContiguous for ColMut<'_, E>
where E: Entity,

§

type Index = (usize, ())

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static mut [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = VecLayoutTransform

§

impl<E> MaybeContiguous for ColRef<'_, E>
where E: Entity,

§

type Index = (usize, ())

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = VecLayoutTransform

§

impl<E> MaybeContiguous for MatMut<'_, E>
where E: Entity,

§

type Index = (usize, usize)

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static mut [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = MatLayoutTransform

§

impl<E> MaybeContiguous for MatRef<'_, E>
where E: Entity,

§

type Index = (usize, usize)

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = MatLayoutTransform

§

impl<E> MaybeContiguous for RowMut<'_, E>
where E: Entity,

§

type Index = ((), usize)

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static mut [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = VecLayoutTransform

§

impl<E> MaybeContiguous for RowRef<'_, E>
where E: Entity,

§

type Index = ((), usize)

§

type Slice = <<E as Entity>::Group as ForType>::FaerOf<&'static [MaybeUninit<<E as Entity>::Unit>]>

§

type LayoutTransform = VecLayoutTransform

§

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, Mat> MaybeContiguous for LastEq<Rows, Cols, Mat>
where Rows: Copy + Eq + Debug, Cols: Copy + Eq + Debug, Mat: MaybeContiguous<Rows = Rows, Cols = Cols>,