Struct LastEq

Source
pub struct LastEq<Rows, Cols, Mat: MatShape<Rows = Rows, Cols = Cols>>(pub Mat);
Expand description

Single matrix view.

Tuple Fields§

§0: Mat

Implementations§

Source§

impl<M: for<'a> MatIndex<'a, Rows = usize, Cols = usize, Index = (usize, usize), LayoutTransform = MatLayoutTransform>> LastEq<usize, usize, M>

Source

pub fn for_each(self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item))

Applies f to each element of self.

Source

pub fn for_each_triangular_lower( self, diag: Diag, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item), )

Applies f to each element of the lower triangular half of self.

diag specifies whether the diagonal should be included or excluded.

Source

pub fn for_each_triangular_upper( self, diag: Diag, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item), )

Applies f to each element of the upper triangular half of self.

diag specifies whether the diagonal should be included or excluded.

Source

pub fn map<E: Entity>( self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item) -> E, ) -> Mat<E>

Applies f to each element of self and collect its result into a new matrix.

Source§

impl<M: for<'a> MatIndex<'a, Rows = (), Cols = usize, Index = ((), usize), LayoutTransform = VecLayoutTransform>> LastEq<(), usize, M>

Source

pub fn for_each(self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item))

Applies f to each element of self.

Source

pub fn map<E: Entity>( self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item) -> E, ) -> Row<E>

Applies f to each element of self and collect its result into a new row.

Source§

impl<M: for<'a> MatIndex<'a, Rows = usize, Cols = (), Index = (usize, ()), LayoutTransform = VecLayoutTransform>> LastEq<usize, (), M>

Source

pub fn for_each(self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item))

Applies f to each element of self.

Source

pub fn map<E: Entity>( self, f: impl for<'a> FnMut(<Self as MatIndex<'a>>::Item) -> E, ) -> Col<E>

Applies f to each element of self and collect its result into a new column.

Trait Implementations§

Source§

impl<Rows: Clone, Cols: Clone, Mat: Clone + MatShape<Rows = Rows, Cols = Cols>> Clone for LastEq<Rows, Cols, Mat>

Source§

fn clone(&self) -> LastEq<Rows, Cols, Mat>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Rows: Debug, Cols: Debug, Mat: Debug + MatShape<Rows = Rows, Cols = Cols>> Debug for LastEq<Rows, Cols, Mat>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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>

Item produced by the zipped views.
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.
Source§

impl<Rows: Copy + Eq, Cols: Copy + Eq, Mat: MatShape<Rows = Rows, Cols = Cols>> MatShape for LastEq<Rows, Cols, Mat>

Source§

type Rows = Rows

Type of rows.
Source§

type Cols = Cols

Type of columns.
Source§

fn nrows(&self) -> Self::Rows

Returns the number of rows.
Source§

fn ncols(&self) -> Self::Cols

Returns the number of columns.
Source§

impl<Rows: Copy + Eq, Cols: Copy + Eq, Mat: MaybeContiguous<Rows = Rows, Cols = Cols>> MaybeContiguous for LastEq<Rows, Cols, Mat>

Source§

type Index = <Mat as MaybeContiguous>::Index

Indexing type.
Source§

type Slice = Last<<Mat as MaybeContiguous>::Slice>

Contiguous slice type.
Source§

type LayoutTransform = <Mat as MaybeContiguous>::LayoutTransform

Layout transformation type.
Source§

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

Returns slice at index of length n_elems.
Source§

impl<Rows: Copy, Cols: Copy, Mat: Copy + MatShape<Rows = Rows, Cols = Cols>> Copy for LastEq<Rows, Cols, Mat>

Auto Trait Implementations§

§

impl<Rows, Cols, Mat> Freeze for LastEq<Rows, Cols, Mat>
where Mat: Freeze,

§

impl<Rows, Cols, Mat> RefUnwindSafe for LastEq<Rows, Cols, Mat>
where Mat: RefUnwindSafe,

§

impl<Rows, Cols, Mat> Send for LastEq<Rows, Cols, Mat>
where Mat: Send,

§

impl<Rows, Cols, Mat> Sync for LastEq<Rows, Cols, Mat>
where Mat: Sync,

§

impl<Rows, Cols, Mat> Unpin for LastEq<Rows, Cols, Mat>
where Mat: Unpin,

§

impl<Rows, Cols, Mat> UnwindSafe for LastEq<Rows, Cols, Mat>
where Mat: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.