pub type Mat<T, Rows = usize, Cols = usize> = Mat<Own<T, Rows, Cols>>;Expand description
heap allocated resizable matrix, similar to a 2d alloc::vec::Vec
§note
the memory layout of Own is guaranteed to be column-major, meaning that it has a row stride
of 1, and an unspecified column stride that can be queried with Mat::col_stride
this implies that while each individual column is stored contiguously in memory, the matrix as a whole may not necessarily be contiguous. the implementation may add padding at the end of each column when overaligning each column can provide a performance gain
let us consider a 3×4 matrix
0 │ 3 │ 6 │ 9
───┼───┼───┼───
1 │ 4 │ 7 │ 10
───┼───┼───┼───
2 │ 5 │ 8 │ 11the memory representation of the data held by such a matrix could look like the following:
[0, 1, 2, x, 3, 4, 5, x, 6, 7, 8, x, 9, 10, 11, x]where x represents padding elements
Aliased Type§
#[repr(transparent)]pub struct Mat<T, Rows = usize, Cols = usize>(pub Own<T, Rows, Cols>);Tuple Fields§
§0: Own<T, Rows, Cols>Implementations§
Source§impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
Sourcepub fn from_fn(
nrows: Rows,
ncols: Cols,
f: impl FnMut(Idx<Rows>, Idx<Cols>) -> T,
) -> Self
pub fn from_fn( nrows: Rows, ncols: Cols, f: impl FnMut(Idx<Rows>, Idx<Cols>) -> T, ) -> Self
returns a new matrix with dimensions (nrows, ncols), filled with the provided function
Sourcepub fn zeros(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
pub fn zeros(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
returns a new matrix with dimensions (nrows, ncols), filled with zeros
Sourcepub fn ones(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
pub fn ones(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
returns a new matrix with dimensions (nrows, ncols), filled with ones
Sourcepub fn identity(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
pub fn identity(nrows: Rows, ncols: Cols) -> Selfwhere
T: ComplexField,
returns a new identity matrix, with ones on the diagonal and zeros everywhere else
Sourcepub fn full(nrows: Rows, ncols: Cols, value: T) -> Selfwhere
T: Clone,
pub fn full(nrows: Rows, ncols: Cols, value: T) -> Selfwhere
T: Clone,
returns a new matrix with dimensions (nrows, ncols), filled with value
Sourcepub fn try_reserve(
&mut self,
new_row_capacity: usize,
new_col_capacity: usize,
) -> Result<(), TryReserveError>
pub fn try_reserve( &mut self, new_row_capacity: usize, new_col_capacity: usize, ) -> Result<(), TryReserveError>
reserves the minimum capacity for new_row_capacity rows and new_col_capacity
columns without reallocating, or returns an error in case of failure. does nothing if the
capacity is already sufficient
Sourcepub fn reserve(&mut self, new_row_capacity: usize, new_col_capacity: usize)
pub fn reserve(&mut self, new_row_capacity: usize, new_col_capacity: usize)
reserves the minimum capacity for new_row_capacity rows and new_col_capacity
columns without reallocating. does nothing if the capacity is already sufficient
Sourcepub fn resize_with(
&mut self,
new_nrows: Rows,
new_ncols: Cols,
f: impl FnMut(Idx<Rows>, Idx<Cols>) -> T,
)
pub fn resize_with( &mut self, new_nrows: Rows, new_ncols: Cols, f: impl FnMut(Idx<Rows>, Idx<Cols>) -> T, )
resizes the matrix in-place so that the new dimensions are (new_nrows, new_ncols).
new elements are created with the given function f, so that elements at index (i, j)
are created by calling f(i, j).
Sourcepub fn truncate(&mut self, new_nrows: Rows, new_ncols: Cols)
pub fn truncate(&mut self, new_nrows: Rows, new_ncols: Cols)
truncates the matrix so that its new dimensions are new_nrows and new_ncols.
both of the new dimensions must be smaller than or equal to the current dimensions
§panics
the function panics if any of the following conditions are violated:
new_nrows > self.nrows()new_ncols > self.ncols()
Sourcepub fn into_shape<V: Shape, H: Shape>(self, nrows: V, ncols: H) -> Mat<T, V, H>
pub fn into_shape<V: Shape, H: Shape>(self, nrows: V, ncols: H) -> Mat<T, V, H>
see MatRef::as_shape
Sourcepub unsafe fn set_dims(&mut self, nrows: Rows, ncols: Cols)
pub unsafe fn set_dims(&mut self, nrows: Rows, ncols: Cols)
set the dimensions of the matrix.
§safety
the behavior is undefined if any of the following conditions are violated:
nrows < self.row_capacity()ncols < self.col_capacity()- the elements that were previously out of bounds but are now in bounds must be initialized
Sourcepub fn col_as_slice(&self, j: Idx<Cols>) -> &[T]
pub fn col_as_slice(&self, j: Idx<Cols>) -> &[T]
returns a reference to a slice over the column at the given index
Sourcepub fn col_as_slice_mut(&mut self, j: Idx<Cols>) -> &mut [T]
pub fn col_as_slice_mut(&mut self, j: Idx<Cols>) -> &mut [T]
returns a reference to a slice over the column at the given index
Source§impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
returns the number of rows and columns of the matrix
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: IdxInc<Rows>, col: IdxInc<Cols>) -> *const T
pub fn ptr_at(&self, row: IdxInc<Rows>, col: IdxInc<Cols>) -> *const T
returns a raw pointer to the element at the given index
Sourcepub unsafe fn ptr_inbounds_at(&self, row: Idx<Rows>, col: Idx<Cols>) -> *const T
pub unsafe fn ptr_inbounds_at(&self, row: Idx<Rows>, col: Idx<Cols>) -> *const T
returns a raw pointer to the element at the given index, assuming the provided index is within the matrix bounds
§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: IdxInc<Rows>,
col: IdxInc<Cols>,
) -> (MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>)
pub fn split_at( &self, row: IdxInc<Rows>, col: IdxInc<Cols>, ) -> (MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>, MatRef<'_, T, usize, usize>)
see MatRef::split_at
Sourcepub fn split_at_row(
&self,
row: IdxInc<Rows>,
) -> (MatRef<'_, T, usize, Cols>, MatRef<'_, T, usize, Cols>)
pub fn split_at_row( &self, row: IdxInc<Rows>, ) -> (MatRef<'_, T, usize, Cols>, MatRef<'_, T, usize, Cols>)
Sourcepub fn split_at_col(
&self,
col: IdxInc<Cols>,
) -> (MatRef<'_, T, Rows, usize>, MatRef<'_, T, Rows, usize>)
pub fn split_at_col( &self, col: IdxInc<Cols>, ) -> (MatRef<'_, T, Rows, usize>, MatRef<'_, T, Rows, usize>)
Sourcepub fn adjoint(&self) -> MatRef<'_, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint(&self) -> MatRef<'_, T::Conj, Cols, Rows>where
T: Conjugate,
see MatRef::adjoint
Sourcepub fn reverse_rows(&self) -> MatRef<'_, T, Rows, Cols>
pub fn reverse_rows(&self) -> MatRef<'_, T, Rows, Cols>
Sourcepub fn reverse_cols(&self) -> MatRef<'_, T, Rows, Cols>
pub fn reverse_cols(&self) -> MatRef<'_, T, Rows, Cols>
Sourcepub fn reverse_rows_and_cols(&self) -> MatRef<'_, T, Rows, Cols>
pub fn reverse_rows_and_cols(&self) -> MatRef<'_, T, Rows, Cols>
Sourcepub fn submatrix<V: Shape, H: Shape>(
&self,
row_start: IdxInc<Rows>,
col_start: IdxInc<Cols>,
nrows: V,
ncols: H,
) -> MatRef<'_, T, V, H>
pub fn submatrix<V: Shape, H: Shape>( &self, row_start: IdxInc<Rows>, col_start: IdxInc<Cols>, nrows: V, ncols: H, ) -> MatRef<'_, T, V, H>
Sourcepub fn subrows<V: Shape>(
&self,
row_start: IdxInc<Rows>,
nrows: V,
) -> MatRef<'_, T, V, Cols>
pub fn subrows<V: Shape>( &self, row_start: IdxInc<Rows>, nrows: V, ) -> MatRef<'_, T, V, Cols>
see MatRef::subrows
Sourcepub fn subcols<H: Shape>(
&self,
col_start: IdxInc<Cols>,
ncols: H,
) -> MatRef<'_, T, Rows, H>
pub fn subcols<H: Shape>( &self, col_start: IdxInc<Cols>, ncols: H, ) -> MatRef<'_, T, Rows, H>
see MatRef::subcols
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> MatRef<'_, T, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> MatRef<'_, T, V, H>
see MatRef::as_shape
Sourcepub fn as_row_shape<V: Shape>(&self, nrows: V) -> MatRef<'_, T, V, Cols>
pub fn as_row_shape<V: Shape>(&self, nrows: V) -> MatRef<'_, T, V, Cols>
Sourcepub fn as_col_shape<H: Shape>(&self, ncols: H) -> MatRef<'_, T, Rows, H>
pub fn as_col_shape<H: Shape>(&self, ncols: H) -> MatRef<'_, T, Rows, H>
Sourcepub fn as_dyn_stride(&self) -> MatRef<'_, T, Rows, Cols, isize, isize>
pub fn as_dyn_stride(&self) -> MatRef<'_, T, Rows, Cols, isize, isize>
Sourcepub fn as_dyn_rows(&self) -> MatRef<'_, T, usize, Cols>
pub fn as_dyn_rows(&self) -> MatRef<'_, T, usize, Cols>
Sourcepub fn as_dyn_cols(&self) -> MatRef<'_, T, Rows, usize>
pub fn as_dyn_cols(&self) -> MatRef<'_, T, Rows, usize>
Sourcepub fn row(&self, i: Idx<Rows>) -> RowRef<'_, T, Cols>
pub fn row(&self, i: Idx<Rows>) -> RowRef<'_, T, Cols>
see MatRef::row
Sourcepub fn col(&self, j: Idx<Cols>) -> ColRef<'_, T, Rows>
pub fn col(&self, j: Idx<Cols>) -> ColRef<'_, T, Rows>
see MatRef::col
Sourcepub fn col_iter(
&self,
) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = ColRef<'_, T, Rows>>
pub fn col_iter( &self, ) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = ColRef<'_, T, Rows>>
see MatRef::col_iter
Sourcepub fn row_iter(
&self,
) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = RowRef<'_, T, Cols>>
pub fn row_iter( &self, ) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = RowRef<'_, T, Cols>>
see MatRef::row_iter
Sourcepub fn par_col_iter(
&self,
) -> impl '_ + IndexedParallelIterator<Item = ColRef<'_, T, Rows>>where
T: Sync,
pub fn par_col_iter(
&self,
) -> impl '_ + IndexedParallelIterator<Item = ColRef<'_, T, Rows>>where
T: Sync,
Sourcepub fn par_row_iter(
&self,
) -> impl '_ + IndexedParallelIterator<Item = RowRef<'_, T, Cols>>where
T: Sync,
pub fn par_row_iter(
&self,
) -> impl '_ + IndexedParallelIterator<Item = RowRef<'_, T, Cols>>where
T: Sync,
Sourcepub fn par_col_chunks(
&self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, Rows, usize>>where
T: Sync,
pub fn par_col_chunks(
&self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, Rows, usize>>where
T: Sync,
Sourcepub fn par_col_partition(
&self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, Rows, usize>>where
T: Sync,
pub fn par_col_partition(
&self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, Rows, usize>>where
T: Sync,
Sourcepub fn par_row_chunks(
&self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, usize, Cols>>where
T: Sync,
pub fn par_row_chunks(
&self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, usize, Cols>>where
T: Sync,
Sourcepub fn par_row_partition(
&self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, usize, Cols>>where
T: Sync,
pub fn par_row_partition(
&self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatRef<'_, T, usize, Cols>>where
T: Sync,
Sourcepub fn try_as_col_major(
&self,
) -> Option<MatRef<'_, T, Rows, Cols, ContiguousFwd>>
pub fn try_as_col_major( &self, ) -> Option<MatRef<'_, T, Rows, Cols, ContiguousFwd>>
Sourcepub fn try_as_row_major(
&self,
) -> Option<MatRef<'_, T, Rows, Cols, isize, ContiguousFwd>>
pub fn try_as_row_major( &self, ) -> Option<MatRef<'_, T, Rows, Cols, isize, ContiguousFwd>>
Sourcepub fn get<RowRange, ColRange>(
&self,
row: RowRange,
col: ColRange,
) -> <MatRef<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
pub fn get<RowRange, ColRange>( &self, row: RowRange, col: ColRange, ) -> <MatRef<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
see MatRef::get
Sourcepub unsafe fn get_unchecked<RowRange, ColRange>(
&self,
row: RowRange,
col: ColRange,
) -> <MatRef<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
pub unsafe fn get_unchecked<RowRange, ColRange>( &self, row: RowRange, col: ColRange, ) -> <MatRef<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
Sourcepub fn get_mut<RowRange, ColRange>(
&mut self,
row: RowRange,
col: ColRange,
) -> <MatMut<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
pub fn get_mut<RowRange, ColRange>( &mut self, row: RowRange, col: ColRange, ) -> <MatMut<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
see MatMut::get_mut
Sourcepub unsafe fn get_mut_unchecked<RowRange, ColRange>(
&mut self,
row: RowRange,
col: ColRange,
) -> <MatMut<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
pub unsafe fn get_mut_unchecked<RowRange, ColRange>( &mut self, row: RowRange, col: ColRange, ) -> <MatMut<'_, T, Rows, Cols> as MatIndex<RowRange, ColRange>>::Target
Source§impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
impl<T, Rows: Shape, Cols: Shape> Mat<T, Rows, Cols>
Sourcepub fn as_ptr_mut(&mut self) -> *mut T
pub fn as_ptr_mut(&mut self) -> *mut T
returns a pointer to the matrix data
Sourcepub fn ptr_at_mut(&mut self, row: IdxInc<Rows>, col: IdxInc<Cols>) -> *mut T
pub fn ptr_at_mut(&mut self, row: IdxInc<Rows>, col: IdxInc<Cols>) -> *mut T
returns a raw pointer to the element at the given index
Sourcepub unsafe fn ptr_inbounds_at_mut(
&mut self,
row: Idx<Rows>,
col: Idx<Cols>,
) -> *mut T
pub unsafe fn ptr_inbounds_at_mut( &mut self, row: Idx<Rows>, col: Idx<Cols>, ) -> *mut T
returns a raw pointer to the element at the given index, assuming the provided index is within the matrix bounds
§safety
the behavior is undefined if any of the following conditions are violated:
row < self.nrows()col < self.ncols()
Sourcepub fn split_at_mut(
&mut self,
row: IdxInc<Rows>,
col: IdxInc<Cols>,
) -> (MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>)
pub fn split_at_mut( &mut self, row: IdxInc<Rows>, col: IdxInc<Cols>, ) -> (MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>, MatMut<'_, T, usize, usize>)
Sourcepub fn split_at_row_mut(
&mut self,
row: IdxInc<Rows>,
) -> (MatMut<'_, T, usize, Cols>, MatMut<'_, T, usize, Cols>)
pub fn split_at_row_mut( &mut self, row: IdxInc<Rows>, ) -> (MatMut<'_, T, usize, Cols>, MatMut<'_, T, usize, Cols>)
Sourcepub fn split_at_col_mut(
&mut self,
col: IdxInc<Cols>,
) -> (MatMut<'_, T, Rows, usize>, MatMut<'_, T, Rows, usize>)
pub fn split_at_col_mut( &mut self, col: IdxInc<Cols>, ) -> (MatMut<'_, T, Rows, usize>, MatMut<'_, T, Rows, usize>)
Sourcepub fn transpose_mut(&mut self) -> MatMut<'_, T, Cols, Rows>
pub fn transpose_mut(&mut self) -> MatMut<'_, T, Cols, Rows>
Sourcepub fn conjugate_mut(&mut self) -> MatMut<'_, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate_mut(&mut self) -> MatMut<'_, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn canonical_mut(&mut self) -> MatMut<'_, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical_mut(&mut self) -> MatMut<'_, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn adjoint_mut(&mut self) -> MatMut<'_, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint_mut(&mut self) -> MatMut<'_, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn reverse_rows_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
pub fn reverse_rows_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
Sourcepub fn reverse_cols_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
pub fn reverse_cols_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
Sourcepub fn reverse_rows_and_cols_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
pub fn reverse_rows_and_cols_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
Sourcepub fn submatrix_mut<V: Shape, H: Shape>(
&mut self,
row_start: IdxInc<Rows>,
col_start: IdxInc<Cols>,
nrows: V,
ncols: H,
) -> MatMut<'_, T, V, H>
pub fn submatrix_mut<V: Shape, H: Shape>( &mut self, row_start: IdxInc<Rows>, col_start: IdxInc<Cols>, nrows: V, ncols: H, ) -> MatMut<'_, T, V, H>
Sourcepub fn subrows_mut<V: Shape>(
&mut self,
row_start: IdxInc<Rows>,
nrows: V,
) -> MatMut<'_, T, V, Cols>
pub fn subrows_mut<V: Shape>( &mut self, row_start: IdxInc<Rows>, nrows: V, ) -> MatMut<'_, T, V, Cols>
Sourcepub fn subcols_mut<H: Shape>(
&mut self,
col_start: IdxInc<Cols>,
ncols: H,
) -> MatMut<'_, T, Rows, H>
pub fn subcols_mut<H: Shape>( &mut self, col_start: IdxInc<Cols>, ncols: H, ) -> MatMut<'_, T, Rows, H>
Sourcepub fn as_shape_mut<V: Shape, H: Shape>(
&mut self,
nrows: V,
ncols: H,
) -> MatMut<'_, T, V, H>
pub fn as_shape_mut<V: Shape, H: Shape>( &mut self, nrows: V, ncols: H, ) -> MatMut<'_, T, V, H>
Sourcepub fn as_row_shape_mut<V: Shape>(&mut self, nrows: V) -> MatMut<'_, T, V, Cols>
pub fn as_row_shape_mut<V: Shape>(&mut self, nrows: V) -> MatMut<'_, T, V, Cols>
Sourcepub fn as_col_shape_mut<H: Shape>(&mut self, ncols: H) -> MatMut<'_, T, Rows, H>
pub fn as_col_shape_mut<H: Shape>(&mut self, ncols: H) -> MatMut<'_, T, Rows, H>
Sourcepub fn as_dyn_stride_mut(&mut self) -> MatMut<'_, T, Rows, Cols, isize, isize>
pub fn as_dyn_stride_mut(&mut self) -> MatMut<'_, T, Rows, Cols, isize, isize>
Sourcepub fn as_dyn_mut(&mut self) -> MatMut<'_, T, usize, usize>
pub fn as_dyn_mut(&mut self) -> MatMut<'_, T, usize, usize>
Sourcepub fn as_dyn_rows_mut(&mut self) -> MatMut<'_, T, usize, Cols>
pub fn as_dyn_rows_mut(&mut self) -> MatMut<'_, T, usize, Cols>
Sourcepub fn as_dyn_cols_mut(&mut self) -> MatMut<'_, T, Rows, usize>
pub fn as_dyn_cols_mut(&mut self) -> MatMut<'_, T, Rows, usize>
Sourcepub fn row_mut(&mut self, i: Idx<Rows>) -> RowMut<'_, T, Cols>
pub fn row_mut(&mut self, i: Idx<Rows>) -> RowMut<'_, T, Cols>
see MatMut::row_mut
Sourcepub fn col_mut(&mut self, j: Idx<Cols>) -> ColMut<'_, T, Rows>
pub fn col_mut(&mut self, j: Idx<Cols>) -> ColMut<'_, T, Rows>
see MatMut::col_mut
Sourcepub fn col_iter_mut(
&mut self,
) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = ColMut<'_, T, Rows>>
pub fn col_iter_mut( &mut self, ) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = ColMut<'_, T, Rows>>
Sourcepub fn row_iter_mut(
&mut self,
) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = RowMut<'_, T, Cols>>
pub fn row_iter_mut( &mut self, ) -> impl '_ + ExactSizeIterator + DoubleEndedIterator<Item = RowMut<'_, T, Cols>>
Sourcepub fn par_col_iter_mut(
&mut self,
) -> impl '_ + IndexedParallelIterator<Item = ColMut<'_, T, Rows>>where
T: Send,
pub fn par_col_iter_mut(
&mut self,
) -> impl '_ + IndexedParallelIterator<Item = ColMut<'_, T, Rows>>where
T: Send,
Sourcepub fn par_row_iter_mut(
&mut self,
) -> impl '_ + IndexedParallelIterator<Item = RowMut<'_, T, Cols>>where
T: Send,
pub fn par_row_iter_mut(
&mut self,
) -> impl '_ + IndexedParallelIterator<Item = RowMut<'_, T, Cols>>where
T: Send,
Sourcepub fn par_col_chunks_mut(
&mut self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, Rows, usize>>where
T: Send,
pub fn par_col_chunks_mut(
&mut self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, Rows, usize>>where
T: Send,
Sourcepub fn par_col_partition_mut(
&mut self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, Rows, usize>>where
T: Send,
pub fn par_col_partition_mut(
&mut self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, Rows, usize>>where
T: Send,
Sourcepub fn par_row_chunks_mut(
&mut self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, usize, Cols>>where
T: Send,
pub fn par_row_chunks_mut(
&mut self,
chunk_size: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, usize, Cols>>where
T: Send,
Sourcepub fn par_row_partition_mut(
&mut self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, usize, Cols>>where
T: Send,
pub fn par_row_partition_mut(
&mut self,
count: usize,
) -> impl '_ + IndexedParallelIterator<Item = MatMut<'_, T, usize, Cols>>where
T: Send,
Sourcepub fn split_first_row_mut(
&mut self,
) -> Option<(RowMut<'_, T, Cols>, MatMut<'_, T, usize, Cols>)>
pub fn split_first_row_mut( &mut self, ) -> Option<(RowMut<'_, T, Cols>, MatMut<'_, T, usize, Cols>)>
Sourcepub fn try_as_col_major_mut(
&mut self,
) -> Option<MatMut<'_, T, Rows, Cols, ContiguousFwd>>
pub fn try_as_col_major_mut( &mut self, ) -> Option<MatMut<'_, T, Rows, Cols, ContiguousFwd>>
Sourcepub fn try_as_row_major_mut(
&mut self,
) -> Option<MatMut<'_, T, Rows, Cols, isize, ContiguousFwd>>
pub fn try_as_row_major_mut( &mut self, ) -> Option<MatMut<'_, T, Rows, Cols, isize, ContiguousFwd>>
Sourcepub fn two_cols_mut(
&mut self,
i0: Idx<Cols>,
i1: Idx<Cols>,
) -> (ColMut<'_, T, Rows>, ColMut<'_, T, Rows>)
pub fn two_cols_mut( &mut self, i0: Idx<Cols>, i1: Idx<Cols>, ) -> (ColMut<'_, T, Rows>, ColMut<'_, T, Rows>)
Source§impl<T, Dim: Shape> Mat<T, Dim, Dim>
impl<T, Dim: Shape> Mat<T, Dim, Dim>
Sourcepub fn diagonal(&self) -> DiagRef<'_, T, Dim, isize>
pub fn diagonal(&self) -> DiagRef<'_, T, Dim, isize>
see MatRef::diagonal
Sourcepub fn diagonal_mut(&mut self) -> DiagMut<'_, T, Dim, isize>
pub fn diagonal_mut(&mut self) -> DiagMut<'_, T, Dim, isize>
Trait Implementations§
Source§impl<T, Rows: Shape, Cols: Shape> AsMatMut for Mat<T, Rows, Cols>
impl<T, Rows: Shape, Cols: Shape> AsMatMut for Mat<T, Rows, Cols>
Source§fn as_mat_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
fn as_mat_mut(&mut self) -> MatMut<'_, T, Rows, Cols>
selfSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for Mat<ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for Mat<ViewT>
Source§fn transpose_apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
fn transpose_apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
self to a matrix with rhs_ncols columnsSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for Mat<ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for Mat<ViewT>
Source§fn transpose_apply_in_place_scratch(
&self,
rhs_ncols: usize,
par: Par,
) -> StackReq
fn transpose_apply_in_place_scratch( &self, rhs_ncols: usize, par: Par, ) -> StackReq
self to a matrix with rhs_ncols columns in placeSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for Mat<ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for Mat<ViewT>
Source§fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
self or the conjugate o
self to a matrix with rhs_ncols columnsSource§impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for Mat<ViewT>
impl<T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for Mat<ViewT>
Source§fn apply_in_place_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
fn apply_in_place_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
self or the conjugate of
self to a matrix with rhs_ncols columns in place