Trait faer_core::zip::Mat

source ·
pub trait Mat<'short, Outlives = &'short Self>: Seal {
    type Item;
    type RawSlice;

    // Required methods
    fn transpose(self) -> Self;
    fn reverse_rows(self) -> Self;
    fn reverse_cols(self) -> Self;
    fn nrows(&self) -> usize;
    fn ncols(&self) -> usize;
    fn row_stride(&self) -> isize;
    fn col_stride(&self) -> isize;
    unsafe fn get(&'short mut self, i: usize, j: usize) -> Self::Item;
    unsafe fn get_column_slice(
        &'short mut self,
        i: usize,
        j: usize,
        n_elems: usize
    ) -> Self::RawSlice;
}
Expand description

Internal trait for abstracting over MatRef and MatMut.

Required Associated Types§

Required Methods§

source

fn transpose(self) -> Self

source

fn reverse_rows(self) -> Self

source

fn reverse_cols(self) -> Self

source

fn nrows(&self) -> usize

source

fn ncols(&self) -> usize

source

fn row_stride(&self) -> isize

source

fn col_stride(&self) -> isize

source

unsafe fn get(&'short mut self, i: usize, j: usize) -> Self::Item

Safety

i and j must be within bounds.

source

unsafe fn get_column_slice( &'short mut self, i: usize, j: usize, n_elems: usize ) -> Self::RawSlice

Safety

The row stride must be 1. [i, i + n_elems) and j must be within bounds.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, 'short, E: Entity> Mat<'short> for MatMut<'a, E>

§

type Item = ReadWrite<'short, E>

§

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

source§

impl<'a, 'short, E: Entity> Mat<'short> for MatRef<'a, E>

§

type Item = Read<'short, E>

§

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