pub struct VerticallyStridedRowIndexMap { /* private fields */ }
Expand description
A vertical row-mapping strategy that selects every stride
-th row from an inner matrix,
starting at a fixed offset
.
This enables vertical striding like selecting rows: offset
, offset + stride
, etc.
Implementations§
Source§impl VerticallyStridedRowIndexMap
impl VerticallyStridedRowIndexMap
Sourcepub fn new_view<T: Send + Sync + Clone, Inner: Matrix<T>>(
inner: Inner,
stride: usize,
offset: usize,
) -> VerticallyStridedMatrixView<Inner>
pub fn new_view<T: Send + Sync + Clone, Inner: Matrix<T>>( inner: Inner, stride: usize, offset: usize, ) -> VerticallyStridedMatrixView<Inner>
Create a new vertically strided view over a matrix.
This selects rows in the inner matrix starting from offset
, and then every stride
rows after.
§Arguments
inner
: The inner matrix to view.stride
: The number of rows between each selected row.offset
: The initial row to start from.
Trait Implementations§
Source§impl Debug for VerticallyStridedRowIndexMap
impl Debug for VerticallyStridedRowIndexMap
Source§impl RowIndexMap for VerticallyStridedRowIndexMap
impl RowIndexMap for VerticallyStridedRowIndexMap
Source§fn map_row_index(&self, r: usize) -> usize
fn map_row_index(&self, r: usize) -> usize
Maps a visible row index
r
to the corresponding row index in the underlying matrix. Read moreSource§fn to_row_major_matrix<T: Clone + Send + Sync, Inner: Matrix<T>>(
&self,
inner: Inner,
) -> RowMajorMatrix<T>
fn to_row_major_matrix<T: Clone + Send + Sync, Inner: Matrix<T>>( &self, inner: Inner, ) -> RowMajorMatrix<T>
Converts the mapped matrix into a dense row-major matrix. Read more
Auto Trait Implementations§
impl Freeze for VerticallyStridedRowIndexMap
impl RefUnwindSafe for VerticallyStridedRowIndexMap
impl Send for VerticallyStridedRowIndexMap
impl Sync for VerticallyStridedRowIndexMap
impl Unpin for VerticallyStridedRowIndexMap
impl UnwindSafe for VerticallyStridedRowIndexMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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