pub type MatRef<'a, E> = Matrix<DenseRef<'a, E>>;
Expand description
Immutable view over a matrix, similar to an immutable reference to a 2D strided slice.
§Note
Unlike a slice, the data pointed to by MatRef<'_, E>
is allowed to be partially or fully
uninitialized under certain conditions. In this case, care must be taken to not perform any
operations that read the uninitialized values, or form references to them, either directly
through MatRef::read
, or indirectly through any of the numerical library routines, unless
it is explicitly permitted.
Aliased Type§
struct MatRef<'a, E> { /* private fields */ }
Implementations§
source§impl<'a, E: Entity> MatRef<'a, E>
impl<'a, E: Entity> MatRef<'a, E>
sourcepub fn row_stride(&self) -> isize
pub fn row_stride(&self) -> isize
Returns the row stride of the matrix, specified in number of elements, not in bytes.
sourcepub fn col_stride(&self) -> isize
pub fn col_stride(&self) -> isize
Returns the column stride of the matrix, specified in number of elements, not in bytes.
sourcepub fn ptr_at(self, row: usize, col: usize) -> GroupFor<E, *const E::Unit>
pub fn ptr_at(self, row: usize, col: usize) -> GroupFor<E, *const E::Unit>
Returns raw pointers to the element at the given indices.
sourcepub unsafe fn ptr_inbounds_at(
self,
row: usize,
col: usize
) -> GroupFor<E, *const E::Unit>
pub unsafe fn ptr_inbounds_at( self, row: usize, col: usize ) -> GroupFor<E, *const E::Unit>
Returns raw pointers to the element at the given indices, assuming the provided indices are within the matrix dimensions.
§Safety
The behavior is undefined if any of the following conditions are violated:
row < self.nrows()
.col < self.ncols()
.
sourcepub unsafe fn split_at_unchecked(
self,
row: usize,
col: usize
) -> (Self, Self, Self, Self)
pub unsafe fn split_at_unchecked( self, row: usize, col: usize ) -> (Self, Self, Self, Self)
Splits the matrix horizontally and vertically at the given indices into four corners and returns an array of each submatrix, in the following order:
- top left.
- top right.
- bottom left.
- bottom right.
§Safety
The behavior is undefined if any of the following conditions are violated:
row <= self.nrows()
.col <= self.ncols()
.
sourcepub fn split_at(self, row: usize, col: usize) -> (Self, Self, Self, Self)
pub fn split_at(self, row: usize, col: usize) -> (Self, Self, Self, Self)
Splits the matrix horizontally and vertically at the given indices into four corners and returns an array of each submatrix, in the following order:
- top left.
- top right.
- bottom left.
- bottom right.
§Panics
The function panics if any of the following conditions are violated:
row <= self.nrows()
.col <= self.ncols()
.
sourcepub unsafe fn split_at_row_unchecked(self, row: usize) -> (Self, Self)
pub unsafe fn split_at_row_unchecked(self, row: usize) -> (Self, Self)
Splits the matrix horizontally at the given row into two parts and returns an array of each submatrix, in the following order:
- top.
- bottom.
§Safety
The behavior is undefined if the following condition is violated:
row <= self.nrows()
.
sourcepub fn split_at_row(self, row: usize) -> (Self, Self)
pub fn split_at_row(self, row: usize) -> (Self, Self)
Splits the matrix horizontally at the given row into two parts and returns an array of each submatrix, in the following order:
- top.
- bottom.
§Panics
The function panics if the following condition is violated:
row <= self.nrows()
.
sourcepub unsafe fn split_at_col_unchecked(self, col: usize) -> (Self, Self)
pub unsafe fn split_at_col_unchecked(self, col: usize) -> (Self, Self)
Splits the matrix vertically at the given row into two parts and returns an array of each submatrix, in the following order:
- left.
- right.
§Safety
The behavior is undefined if the following condition is violated:
col <= self.ncols()
.
sourcepub fn split_at_col(self, col: usize) -> (Self, Self)
pub fn split_at_col(self, col: usize) -> (Self, Self)
Splits the matrix vertically at the given row into two parts and returns an array of each submatrix, in the following order:
- left.
- right.
§Panics
The function panics if the following condition is violated:
col <= self.ncols()
.
sourcepub unsafe fn get_unchecked<RowRange, ColRange>(
self,
row: RowRange,
col: ColRange
) -> <Self as MatIndex<RowRange, ColRange>>::Targetwhere
Self: MatIndex<RowRange, ColRange>,
pub unsafe fn get_unchecked<RowRange, ColRange>(
self,
row: RowRange,
col: ColRange
) -> <Self as MatIndex<RowRange, ColRange>>::Targetwhere
Self: MatIndex<RowRange, ColRange>,
Returns references to the element at the given indices, or submatrices if either row
or col
is a range.
§Note
The values pointed to by the references are expected to be initialized, even if the pointed-to value is not read, otherwise the behavior is undefined.
§Safety
The behavior is undefined if any of the following conditions are violated:
row
must be contained in[0, self.nrows())
.col
must be contained in[0, self.ncols())
.
sourcepub fn get<RowRange, ColRange>(
self,
row: RowRange,
col: ColRange
) -> <Self as MatIndex<RowRange, ColRange>>::Targetwhere
Self: MatIndex<RowRange, ColRange>,
pub fn get<RowRange, ColRange>(
self,
row: RowRange,
col: ColRange
) -> <Self as MatIndex<RowRange, ColRange>>::Targetwhere
Self: MatIndex<RowRange, ColRange>,
Returns references to the element at the given indices, or submatrices if either row
or col
is a range, with bound checks.
§Note
The values pointed to by the references are expected to be initialized, even if the pointed-to value is not read, otherwise the behavior is undefined.
§Panics
The function panics if any of the following conditions are violated:
row
must be contained in[0, self.nrows())
.col
must be contained in[0, self.ncols())
.
sourcepub unsafe fn read_unchecked(&self, row: usize, col: usize) -> E
pub unsafe fn read_unchecked(&self, row: usize, col: usize) -> E
Reads the value of the element at the given indices.
§Safety
The behavior is undefined if any of the following conditions are violated:
row < self.nrows()
.col < self.ncols()
.
sourcepub fn read(&self, row: usize, col: usize) -> E
pub fn read(&self, row: usize, col: usize) -> E
Reads the value of the element at the given indices, with bound checks.
§Panics
The function panics if any of the following conditions are violated:
row < self.nrows()
.col < self.ncols()
.
sourcepub fn transpose(self) -> Self
pub fn transpose(self) -> Self
Returns a view over the transpose of self
.
§Example
use faer_core::mat;
let matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_ref();
let transpose = view.transpose();
let expected = mat![[1.0, 4.0], [2.0, 5.0], [3.0, 6.0]];
assert_eq!(expected.as_ref(), transpose);
sourcepub fn conjugate(self) -> MatRef<'a, E::Conj>where
E: Conjugate,
pub fn conjugate(self) -> MatRef<'a, E::Conj>where
E: Conjugate,
Returns a view over the conjugate of self
.
sourcepub fn adjoint(self) -> MatRef<'a, E::Conj>where
E: Conjugate,
pub fn adjoint(self) -> MatRef<'a, E::Conj>where
E: Conjugate,
Returns a view over the conjugate transpose of self
.
sourcepub fn canonicalize(self) -> (MatRef<'a, E::Canonical>, Conj)where
E: Conjugate,
pub fn canonicalize(self) -> (MatRef<'a, E::Canonical>, Conj)where
E: Conjugate,
Returns a view over the canonical representation of self
, as well as a flag declaring
whether self
is implicitly conjugated or not.
sourcepub fn reverse_rows(self) -> Self
pub fn reverse_rows(self) -> Self
Returns a view over the self
, with the rows in reversed order.
§Example
use faer_core::mat;
let matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_ref();
let reversed_rows = view.reverse_rows();
let expected = mat![[4.0, 5.0, 6.0], [1.0, 2.0, 3.0]];
assert_eq!(expected.as_ref(), reversed_rows);
sourcepub fn reverse_cols(self) -> Self
pub fn reverse_cols(self) -> Self
Returns a view over the self
, with the columns in reversed order.
§Example
use faer_core::mat;
let matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_ref();
let reversed_cols = view.reverse_cols();
let expected = mat![[3.0, 2.0, 1.0], [6.0, 5.0, 4.0]];
assert_eq!(expected.as_ref(), reversed_cols);
sourcepub fn reverse_rows_and_cols(self) -> Self
pub fn reverse_rows_and_cols(self) -> Self
Returns a view over the self
, with the rows and the columns in reversed order.
§Example
use faer_core::mat;
let matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_ref();
let reversed = view.reverse_rows_and_cols();
let expected = mat![[6.0, 5.0, 4.0], [3.0, 2.0, 1.0]];
assert_eq!(expected.as_ref(), reversed);
sourcepub unsafe fn submatrix_unchecked(
self,
row_start: usize,
col_start: usize,
nrows: usize,
ncols: usize
) -> Self
pub unsafe fn submatrix_unchecked( self, row_start: usize, col_start: usize, nrows: usize, ncols: usize ) -> Self
Returns a view over the submatrix starting at indices (row_start, col_start)
, and with
dimensions (nrows, ncols)
.
§Safety
The behavior is undefined if any of the following conditions are violated:
row_start <= self.nrows()
.col_start <= self.ncols()
.nrows <= self.nrows() - row_start
.ncols <= self.ncols() - col_start
.
sourcepub fn submatrix(
self,
row_start: usize,
col_start: usize,
nrows: usize,
ncols: usize
) -> Self
pub fn submatrix( self, row_start: usize, col_start: usize, nrows: usize, ncols: usize ) -> Self
Returns a view over the submatrix starting at indices (row_start, col_start)
, and with
dimensions (nrows, ncols)
.
§Panics
The function panics if any of the following conditions are violated:
row_start <= self.nrows()
.col_start <= self.ncols()
.nrows <= self.nrows() - row_start
.ncols <= self.ncols() - col_start
.
§Example
use faer_core::mat;
let matrix = mat![
[1.0, 5.0, 9.0],
[2.0, 6.0, 10.0],
[3.0, 7.0, 11.0],
[4.0, 8.0, 12.0f64],
];
let view = matrix.as_ref();
let submatrix = view.submatrix(2, 1, 2, 2);
let expected = mat![[7.0, 11.0], [8.0, 12.0f64]];
assert_eq!(expected.as_ref(), submatrix);
sourcepub unsafe fn subrows_unchecked(self, row_start: usize, nrows: usize) -> Self
pub unsafe fn subrows_unchecked(self, row_start: usize, nrows: usize) -> Self
Returns a view over the submatrix starting at row row_start
, and with number of rows
nrows
.
§Safety
The behavior is undefined if any of the following conditions are violated:
row_start <= self.nrows()
.nrows <= self.nrows() - row_start
.
sourcepub fn subrows(self, row_start: usize, nrows: usize) -> Self
pub fn subrows(self, row_start: usize, nrows: usize) -> Self
Returns a view over the submatrix starting at row row_start
, and with number of rows
nrows
.
§Panics
The function panics if any of the following conditions are violated:
row_start <= self.nrows()
.nrows <= self.nrows() - row_start
.
§Example
use faer_core::mat;
let matrix = mat![
[1.0, 5.0, 9.0],
[2.0, 6.0, 10.0],
[3.0, 7.0, 11.0],
[4.0, 8.0, 12.0f64],
];
let view = matrix.as_ref();
let subrows = view.subrows(1, 2);
let expected = mat![[2.0, 6.0, 10.0], [3.0, 7.0, 11.0],];
assert_eq!(expected.as_ref(), subrows);
sourcepub unsafe fn subcols_unchecked(self, col_start: usize, ncols: usize) -> Self
pub unsafe fn subcols_unchecked(self, col_start: usize, ncols: usize) -> Self
Returns a view over the submatrix starting at column col_start
, and with number of
columns ncols
.
§Safety
The behavior is undefined if any of the following conditions are violated:
col_start <= self.ncols()
.ncols <= self.ncols() - col_start
.
sourcepub fn subcols(self, col_start: usize, ncols: usize) -> Self
pub fn subcols(self, col_start: usize, ncols: usize) -> Self
Returns a view over the submatrix starting at column col_start
, and with number of
columns ncols
.
§Panics
The function panics if any of the following conditions are violated:
col_start <= self.ncols()
.ncols <= self.ncols() - col_start
.
§Example
use faer_core::mat;
let matrix = mat![
[1.0, 5.0, 9.0],
[2.0, 6.0, 10.0],
[3.0, 7.0, 11.0],
[4.0, 8.0, 12.0f64],
];
let view = matrix.as_ref();
let subcols = view.subcols(2, 1);
let expected = mat![[9.0], [10.0], [11.0], [12.0f64]];
assert_eq!(expected.as_ref(), subcols);
sourcepub unsafe fn row_unchecked(self, row_idx: usize) -> RowRef<'a, E>
pub unsafe fn row_unchecked(self, row_idx: usize) -> RowRef<'a, E>
Returns a view over the row at the given index.
§Safety
The function panics if any of the following conditions are violated:
row_idx < self.nrows()
.
sourcepub fn row(self, row_idx: usize) -> RowRef<'a, E>
pub fn row(self, row_idx: usize) -> RowRef<'a, E>
Returns a view over the row at the given index.
§Panics
The function panics if any of the following conditions are violated:
row_idx < self.nrows()
.
sourcepub unsafe fn col_unchecked(self, col_idx: usize) -> ColRef<'a, E>
pub unsafe fn col_unchecked(self, col_idx: usize) -> ColRef<'a, E>
Returns a view over the column at the given index.
§Safety
The behavior is undefined if any of the following conditions are violated:
col_idx < self.ncols()
.
sourcepub fn col(self, col_idx: usize) -> ColRef<'a, E>
pub fn col(self, col_idx: usize) -> ColRef<'a, E>
Returns a view over the column at the given index.
§Panics
The function panics if any of the following conditions are violated:
col_idx < self.ncols()
.
sourcepub fn column_vector_as_diagonal(self) -> Matrix<DiagRef<'a, E>>
pub fn column_vector_as_diagonal(self) -> Matrix<DiagRef<'a, E>>
Given a matrix with a single column, returns an object that interprets the column as a diagonal matrix, whoes diagonal elements are values in the column.
sourcepub fn to_owned(&self) -> Mat<E::Canonical>where
E: Conjugate,
pub fn to_owned(&self) -> Mat<E::Canonical>where
E: Conjugate,
Returns an owning Mat
of the data.
sourcepub fn has_nan(&self) -> boolwhere
E: ComplexField,
pub fn has_nan(&self) -> boolwhere
E: ComplexField,
Returns true
if any of the elements is NaN, otherwise returns false
.
sourcepub fn is_all_finite(&self) -> boolwhere
E: ComplexField,
pub fn is_all_finite(&self) -> boolwhere
E: ComplexField,
Returns true
if all of the elements are finite, otherwise returns false
.
sourcepub fn norm_max(&self) -> E::Realwhere
E: ComplexField,
pub fn norm_max(&self) -> E::Realwhere
E: ComplexField,
Returns the maximum norm of self
.
sourcepub fn norm_l2(&self) -> E::Realwhere
E: ComplexField,
pub fn norm_l2(&self) -> E::Realwhere
E: ComplexField,
Returns the L2 norm of self
.
sourcepub fn sum(&self) -> Ewhere
E: ComplexField,
pub fn sum(&self) -> Ewhere
E: ComplexField,
Returns the sum of self
.
sourcepub fn kron(&self, rhs: impl As2D<E>) -> Mat<E>where
E: ComplexField,
pub fn kron(&self, rhs: impl As2D<E>) -> Mat<E>where
E: ComplexField,
Kroneckor product of self
and rhs
.
This is an allocating operation; see kron
for the
allocation-free version or more info in general.
sourcepub fn col_chunks(
self,
chunk_size: usize
) -> impl 'a + DoubleEndedIterator<Item = MatRef<'a, E>>
pub fn col_chunks( self, chunk_size: usize ) -> impl 'a + DoubleEndedIterator<Item = MatRef<'a, E>>
Returns an iterator that provides successive chunks of the columns of this matrix, with
each having at most chunk_size
columns.
If the number of columns is a multiple of chunk_size
, then all chunks have
chunk_size
columns.
sourcepub fn row_chunks(
self,
chunk_size: usize
) -> impl 'a + DoubleEndedIterator<Item = MatRef<'a, E>>
pub fn row_chunks( self, chunk_size: usize ) -> impl 'a + DoubleEndedIterator<Item = MatRef<'a, E>>
Returns an iterator that provides successive chunks of the rows of this matrix, with
each having at most chunk_size
rows.
If the number of rows is a multiple of chunk_size
, then all chunks have chunk_size
rows.
sourcepub fn par_col_chunks(
self,
chunk_size: usize
) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
Available on crate feature rayon
only.
pub fn par_col_chunks( self, chunk_size: usize ) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
rayon
only.Returns a parallel iterator that provides successive chunks of the columns of this
matrix, with each having at most chunk_size
columns.
If the number of columns is a multiple of chunk_size
, then all chunks have
chunk_size
columns.
Only available with the rayon
feature.
sourcepub fn par_row_chunks(
self,
chunk_size: usize
) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
Available on crate feature rayon
only.
pub fn par_row_chunks( self, chunk_size: usize ) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
rayon
only.Returns a parallel iterator that provides successive chunks of the rows of this matrix,
with each having at most chunk_size
rows.
If the number of rows is a multiple of chunk_size
, then all chunks have chunk_size
rows.
Only available with the rayon
feature.
sourcepub fn into_par_row_chunks(
self,
chunk_size: usize
) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
👎Deprecated: replaced by MatRef::par_row_chunks
Available on crate feature rayon
only.
pub fn into_par_row_chunks( self, chunk_size: usize ) -> impl 'a + IndexedParallelIterator<Item = MatRef<'a, E>>
MatRef::par_row_chunks
rayon
only.Returns a parallel iterator that provides successive chunks of the rows of this matrix,
with each having at most chunk_size
rows.
If the number of rows is a multiple of chunk_size
, then all chunks have chunk_size
rows.
Only available with the rayon
feature.
Trait Implementations§
source§impl<E: Entity> AsMatRef<E> for &MatRef<'_, E>
impl<E: Entity> AsMatRef<E> for &MatRef<'_, E>
source§fn as_mat_ref(&self) -> MatRef<'_, E>
fn as_mat_ref(&self) -> MatRef<'_, E>
source§impl<E: Entity> AsMatRef<E> for MatRef<'_, E>
impl<E: Entity> AsMatRef<E> for MatRef<'_, E>
source§fn as_mat_ref(&self) -> MatRef<'_, E>
fn as_mat_ref(&self) -> MatRef<'_, E>
source§impl<E: Entity> DenseAccess<E> for MatRef<'_, E>
Available on crate feature std
only.
impl<E: Entity> DenseAccess<E> for MatRef<'_, E>
std
only.fn fetch_single(&self, row: usize, col: usize) -> E
source§impl<'a, E: Entity> MatIndex<'a> for MatRef<'_, E>
impl<'a, E: Entity> MatIndex<'a> for MatRef<'_, E>
source§unsafe fn get_unchecked(&'a mut self, (i, j): Self::Index) -> Self::Item
unsafe fn get_unchecked(&'a mut self, (i, j): Self::Index) -> Self::Item
source§unsafe fn get_from_slice_unchecked(
slice: &'a mut Self::Slice,
idx: usize
) -> Self::Item
unsafe fn get_from_slice_unchecked( slice: &'a mut Self::Slice, idx: usize ) -> Self::Item
source§fn is_contiguous(&self) -> bool
fn is_contiguous(&self) -> bool
source§fn preferred_layout(&self) -> Self::LayoutTransform
fn preferred_layout(&self) -> Self::LayoutTransform
source§fn with_layout(self, layout: Self::LayoutTransform) -> Self
fn with_layout(self, layout: Self::LayoutTransform) -> Self
source§impl<E: Entity> MatIndex<Range<usize>, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<Range<usize>, Range<usize>> for MatRef<'_, E>
source§impl<E: Entity> MatIndex<Range<usize>, usize> for MatRef<'_, E>
impl<E: Entity> MatIndex<Range<usize>, usize> for MatRef<'_, E>
source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<RangeFrom<usize>, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeFrom<usize>, Range<usize>> for MatRef<'_, E>
source§impl<E: Entity> MatIndex<RangeFrom<usize>, usize> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeFrom<usize>, usize> for MatRef<'_, E>
source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<RangeFull, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeFull, Range<usize>> for MatRef<'_, E>
source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<'a, E: Entity> MatIndex<RangeFull, usize> for MatRef<'a, E>
impl<'a, E: Entity> MatIndex<RangeFull, usize> for MatRef<'a, E>
§type Target = Matrix<DenseColRef<'a, E>>
type Target = Matrix<DenseColRef<'a, E>>
source§fn get(this: Self, row: RangeFull, col: usize) -> Self::Target
fn get(this: Self, row: RangeFull, col: usize) -> Self::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<RangeInclusive<usize>, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeInclusive<usize>, Range<usize>> for MatRef<'_, E>
source§impl<E: Entity> MatIndex<RangeInclusive<usize>, usize> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeInclusive<usize>, usize> for MatRef<'_, E>
source§fn get(this: Self, row: RangeInclusive<usize>, col: usize) -> Self
fn get(this: Self, row: RangeInclusive<usize>, col: usize) -> Self
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<RangeTo<usize>, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeTo<usize>, Range<usize>> for MatRef<'_, E>
source§impl<E: Entity> MatIndex<RangeTo<usize>, usize> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeTo<usize>, usize> for MatRef<'_, E>
source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<RangeToInclusive<usize>, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeToInclusive<usize>, Range<usize>> for MatRef<'_, E>
source§impl<E: Entity> MatIndex<RangeToInclusive<usize>, usize> for MatRef<'_, E>
impl<E: Entity> MatIndex<RangeToInclusive<usize>, usize> for MatRef<'_, E>
source§fn get(this: Self, row: RangeToInclusive<usize>, col: usize) -> Self
fn get(this: Self, row: RangeToInclusive<usize>, col: usize) -> Self
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity, RowRange> MatIndex<RowRange, RangeFrom<usize>> for MatRef<'_, E>
impl<E: Entity, RowRange> MatIndex<RowRange, RangeFrom<usize>> for MatRef<'_, E>
§type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
source§fn get(
this: Self,
row: RowRange,
col: RangeFrom<usize>
) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
fn get( this: Self, row: RowRange, col: RangeFrom<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity, RowRange> MatIndex<RowRange, RangeFull> for MatRef<'_, E>
impl<E: Entity, RowRange> MatIndex<RowRange, RangeFull> for MatRef<'_, E>
§type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
source§fn get(
this: Self,
row: RowRange,
col: RangeFull
) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
fn get( this: Self, row: RowRange, col: RangeFull ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity, RowRange> MatIndex<RowRange, RangeInclusive<usize>> for MatRef<'_, E>
impl<E: Entity, RowRange> MatIndex<RowRange, RangeInclusive<usize>> for MatRef<'_, E>
§type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
source§fn get(
this: Self,
row: RowRange,
col: RangeInclusive<usize>
) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
fn get( this: Self, row: RowRange, col: RangeInclusive<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity, RowRange> MatIndex<RowRange, RangeTo<usize>> for MatRef<'_, E>
impl<E: Entity, RowRange> MatIndex<RowRange, RangeTo<usize>> for MatRef<'_, E>
§type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
source§fn get(
this: Self,
row: RowRange,
col: RangeTo<usize>
) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
fn get( this: Self, row: RowRange, col: RangeTo<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity, RowRange> MatIndex<RowRange, RangeToInclusive<usize>> for MatRef<'_, E>
impl<E: Entity, RowRange> MatIndex<RowRange, RangeToInclusive<usize>> for MatRef<'_, E>
§type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
type Target = <Matrix<DenseRef<'_, E>> as MatIndex<RowRange, Range<usize>>>::Target
source§fn get(
this: Self,
row: RowRange,
col: RangeToInclusive<usize>
) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
fn get( this: Self, row: RowRange, col: RangeToInclusive<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target
(row, col)
.source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.source§impl<E: Entity> MatIndex<usize, Range<usize>> for MatRef<'_, E>
impl<E: Entity> MatIndex<usize, Range<usize>> for MatRef<'_, E>
source§unsafe fn get_unchecked(
this: Self,
row: RowRange,
col: ColRange
) -> Self::Target
unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target
(row, col)
, without bound checks.