Trait extendr_api::prelude::mat::MatIndex
pub trait MatIndex<RowRange, ColRange>: Sized + Seal {
type Target;
// Required method
fn get(this: Self, row: RowRange, col: ColRange) -> Self::Target;
// Provided method
unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange,
) -> Self::Target { ... }
}
Expand description
Represents a type that can be used to slice a matrix, such as an index or a range of indices.
Required Associated Types§
type Target
type Target
Resulting type of the indexing operation.
Required Methods§
Provided Methods§
unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange,
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange, ) -> Self::Target
Index the matrix at (row, col)
, without bound checks.
Object Safety§
This trait is not object safe.