AsMatRef

Trait AsMatRef 

Source
pub trait AsMatRef {
    type T;
    type Rows: Shape;
    type Cols: Shape;
    type Owned: AsMat<Self::T, T = Self::T, Rows = Self::Rows, Cols = Self::Cols, Owned = Self::Owned>;

    // Required method
    fn as_mat_ref(&self) -> MatRef<'_, Self::T, Self::Rows, Self::Cols>;
}
Expand description

trait for types that can be converted to a matrix view

Required Associated Types§

Source

type T

scalar type

Source

type Rows: Shape

row dimension type

Source

type Cols: Shape

column dimension type

Source

type Owned: AsMat<Self::T, T = Self::T, Rows = Self::Rows, Cols = Self::Cols, Owned = Self::Owned>

owned matrix type

Required Methods§

Source

fn as_mat_ref(&self) -> MatRef<'_, Self::T, Self::Rows, Self::Cols>

returns a view over self

Implementations on Foreign Types§

Source§

impl<M: AsMatRef> AsMatRef for &M

Source§

type Cols = <M as AsMatRef>::Cols

Source§

type Owned = <M as AsMatRef>::Owned

Source§

type Rows = <M as AsMatRef>::Rows

Source§

type T = <M as AsMatRef>::T

Source§

fn as_mat_ref(&self) -> MatRef<'_, Self::T, Self::Rows, Self::Cols>

Source§

impl<M: AsMatRef> AsMatRef for &mut M

Source§

type Cols = <M as AsMatRef>::Cols

Source§

type Owned = <M as AsMatRef>::Owned

Source§

type Rows = <M as AsMatRef>::Rows

Source§

type T = <M as AsMatRef>::T

Source§

fn as_mat_ref(&self) -> MatRef<'_, Self::T, Self::Rows, Self::Cols>

Implementors§

Source§

impl<T, Cols: Shape> AsMatRef for Row<T, Cols>

Source§

type Cols = Cols

Source§

type Owned = Row<Own<T, Cols>>

Source§

type Rows = One

Source§

type T = T

Source§

impl<T, Cols: Shape, Rs: Stride> AsMatRef for RowMut<'_, T, Cols, Rs>

Source§

type Cols = Cols

Source§

type Owned = Row<Own<T, Cols>>

Source§

type Rows = One

Source§

type T = T

Source§

impl<T, Cols: Shape, Rs: Stride> AsMatRef for RowRef<'_, T, Cols, Rs>

Source§

type Cols = Cols

Source§

type Owned = Row<Own<T, Cols>>

Source§

type Rows = One

Source§

type T = T

Source§

impl<T, Rows: Shape> AsMatRef for Col<T, Rows>

Source§

type Cols = One

Source§

type Owned = Col<Own<T, Rows>>

Source§

type Rows = Rows

Source§

type T = T

Source§

impl<T, Rows: Shape, Cols: Shape> AsMatRef for Mat<T, Rows, Cols>

Source§

type Cols = Cols

Source§

type Owned = Mat<Own<T, Rows, Cols>>

Source§

type Rows = Rows

Source§

type T = T

Source§

impl<T, Rows: Shape, Cols: Shape, RStride: Stride, CStride: Stride> AsMatRef for MatMut<'_, T, Rows, Cols, RStride, CStride>

Source§

type Cols = Cols

Source§

type Owned = Mat<Own<T, Rows, Cols>>

Source§

type Rows = Rows

Source§

type T = T

Source§

impl<T, Rows: Shape, Cols: Shape, RStride: Stride, CStride: Stride> AsMatRef for MatRef<'_, T, Rows, Cols, RStride, CStride>

Source§

type Cols = Cols

Source§

type Owned = Mat<Own<T, Rows, Cols>>

Source§

type Rows = Rows

Source§

type T = T

Source§

impl<T, Rows: Shape, Rs: Stride> AsMatRef for ColMut<'_, T, Rows, Rs>

Source§

type Cols = One

Source§

type Owned = Col<Own<T, Rows>>

Source§

type Rows = Rows

Source§

type T = T

Source§

impl<T, Rows: Shape, Rs: Stride> AsMatRef for ColRef<'_, T, Rows, Rs>

Source§

type Cols = One

Source§

type Owned = Col<Own<T, Rows>>

Source§

type Rows = Rows

Source§

type T = T