Struct extendr_api::prelude::modules::core::zip::LastEq

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

Single matrix view.

Tuple Fields§

§0: Mat

Implementations§

§

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

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

Applies f to each element of self.

pub fn for_each_with_index( self, f: impl for<'a> FnMut(usize, usize, <LastEq<usize, usize, M> as MatIndex<'a>>::Item), )

Applies f to each element of self, while passing the indices of the position of the current element.

pub fn for_each_triangular_lower_with_index( self, diag: Diag, f: impl for<'a> FnMut(usize, usize, <LastEq<usize, usize, M> as MatIndex<'a>>::Item), )

Applies f to each element of the lower triangular half of self, while passing the indices of the position of the current element.

diag specifies whether the diagonal should be included or excluded.

pub fn for_each_triangular_upper_with_index( self, diag: Diag, f: impl for<'a> FnMut(usize, usize, <LastEq<usize, usize, M> as MatIndex<'a>>::Item), )

Applies f to each element of the upper triangular half of self, while passing the indices of the position of the current element.

diag specifies whether the diagonal should be included or excluded.

pub fn for_each_triangular_lower( self, diag: Diag, f: impl for<'a> FnMut(<LastEq<usize, usize, M> 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.

pub fn for_each_triangular_upper( self, diag: Diag, f: impl for<'a> FnMut(<LastEq<usize, usize, M> 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.

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

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

pub fn map_with_index<E>( self, f: impl for<'a> FnMut(usize, usize, <LastEq<usize, usize, M> as MatIndex<'a>>::Item) -> E, ) -> Mat<E>
where E: Entity,

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

§

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

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

Applies f to each element of self.

pub fn for_each_with_index( self, f: impl for<'a> FnMut(usize, <LastEq<(), usize, M> as MatIndex<'a>>::Item), )

Applies f to each element of self, while passing in the index of the current element.

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

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

pub fn map_with_index<E>( self, f: impl for<'a> FnMut(usize, <LastEq<(), usize, M> as MatIndex<'a>>::Item) -> E, ) -> Row<E>
where E: Entity,

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

§

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

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

Applies f to each element of self.

pub fn for_each_with_index( self, f: impl for<'a> FnMut(usize, <LastEq<usize, (), M> as MatIndex<'a>>::Item), )

Applies f to each element of self, while passing in the index of the current element.

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

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

pub fn map_with_index<E>( self, f: impl for<'a> FnMut(usize, <LastEq<usize, (), M> as MatIndex<'a>>::Item) -> E, ) -> Col<E>
where E: Entity,

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

Trait Implementations§

§

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

§

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

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

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

§

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

Formats the value using the given formatter. Read more
§

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

§

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

Item produced by the zipped views.
§

unsafe fn get_unchecked( &'a mut self, index: <LastEq<Rows, Cols, Mat> as MaybeContiguous>::Index, ) -> <LastEq<Rows, Cols, Mat> as MatIndex<'a>>::Item

Get the item at the given index, skipping bound checks.
§

unsafe fn get_from_slice_unchecked( slice: &'a mut <LastEq<Rows, Cols, Mat> as MaybeContiguous>::Slice, idx: usize, ) -> <LastEq<Rows, Cols, Mat> as MatIndex<'a>>::Item

Get the item at the given slice position, skipping bound checks.
§

fn is_contiguous(&self) -> bool

Checks if the zipped matrices are contiguous.
§

fn preferred_layout( &self, ) -> <LastEq<Rows, Cols, Mat> as MaybeContiguous>::LayoutTransform

Computes the preferred iteration layout of the matrices.
§

fn with_layout( self, layout: <LastEq<Rows, Cols, Mat> as MaybeContiguous>::LayoutTransform, ) -> LastEq<Rows, Cols, Mat>

Applies the layout transformation to the matrices.
§

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

§

type Rows = Rows

Type of rows.
§

type Cols = Cols

Type of columns.
§

fn nrows(&self) -> <LastEq<Rows, Cols, Mat> as MatShape>::Rows

Returns the number of rows.
§

fn ncols(&self) -> <LastEq<Rows, Cols, Mat> as MatShape>::Cols

Returns the number of columns.
§

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>,

§

type Index = <Mat as MaybeContiguous>::Index

Indexing type.
§

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

Contiguous slice type.
§

type LayoutTransform = <Mat as MaybeContiguous>::LayoutTransform

Layout transformation type.
§

unsafe fn get_slice_unchecked( &mut self, idx: <LastEq<Rows, Cols, Mat> as MaybeContiguous>::Index, n_elems: usize, ) -> <LastEq<Rows, Cols, Mat> as MaybeContiguous>::Slice

Returns slice at index of length n_elems.
§

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

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

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.