pub struct SubmatrixMut<'a, V, T>where
V: 'a + AsPointerToSlice<T>,{ /* private fields */ }Expand description
Mutable view on a matrix that stores elements of type T.
This view is designed to work with various underlying representations
of the matrix, as described by AsPointerToSlice.
Implementations§
Source§impl<'a, V, T> SubmatrixMut<'a, V, T>where
V: 'a + AsPointerToSlice<T>,
impl<'a, V, T> SubmatrixMut<'a, V, T>where
V: 'a + AsPointerToSlice<T>,
pub fn submatrix(self, rows: Range<usize>, cols: Range<usize>) -> Self
pub fn restrict_rows(self, rows: Range<usize>) -> Self
pub fn restrict_cols(self, cols: Range<usize>) -> Self
pub fn split_rows( self, fst_rows: Range<usize>, snd_rows: Range<usize>, ) -> (Self, Self)
pub fn split_cols( self, fst_cols: Range<usize>, snd_cols: Range<usize>, ) -> (Self, Self)
pub fn row_iter(self) -> impl 'a + ExactSizeIterator<Item = &'a mut [T]>
pub fn col_iter(self) -> impl 'a + ExactSizeIterator<Item = ColumnMut<'a, V, T>>
pub fn into_at_mut(self, i: usize, j: usize) -> &'a mut T
pub fn at_mut<'b>(&'b mut self, i: usize, j: usize) -> &'b mut T
pub fn at<'b>(&'b self, i: usize, j: usize) -> &'b T
pub fn row_at<'b>(&'b self, i: usize) -> &'b [T]
pub fn into_row_mut_at(self, i: usize) -> &'a mut [T]
pub fn row_mut_at<'b>(&'b mut self, i: usize) -> &'b mut [T]
pub fn col_at<'b>(&'b self, j: usize) -> Column<'b, V, T>
pub fn col_mut_at<'b>(&'b mut self, j: usize) -> ColumnMut<'b, V, T>
pub fn reborrow<'b>(&'b mut self) -> SubmatrixMut<'b, V, T>
pub fn as_const<'b>(&'b self) -> Submatrix<'b, V, T>
pub fn col_count(&self) -> usize
pub fn row_count(&self) -> usize
Source§impl<'a, T> SubmatrixMut<'a, AsFirstElement<T>, T>
impl<'a, T> SubmatrixMut<'a, AsFirstElement<T>, T>
Sourcepub fn from_1d(data: &'a mut [T], row_count: usize, col_count: usize) -> Self
pub fn from_1d(data: &'a mut [T], row_count: usize, col_count: usize) -> Self
Creates a view on the given data slice, interpreting it as a matrix of given shape.
Assumes row-major order, i.e. contigous subslices of data will be the rows of the
resulting matrix.
pub fn from_ndarray<S>(data: &'a mut ArrayBase<S, Ix2>) -> Selfwhere
S: DataMut<Elem = T>,
Available on crate feature
ndarray only.Source§impl<'a, V: AsPointerToSlice<T> + Deref<Target = [T]>, T> SubmatrixMut<'a, V, T>
impl<'a, V: AsPointerToSlice<T> + Deref<Target = [T]>, T> SubmatrixMut<'a, V, T>
Trait Implementations§
Source§impl<'a, V: AsPointerToSlice<T>, T> From<SubmatrixMut<'a, V, T>> for TransposableSubmatrixMut<'a, V, T, false>
impl<'a, V: AsPointerToSlice<T>, T> From<SubmatrixMut<'a, V, T>> for TransposableSubmatrixMut<'a, V, T, false>
Source§fn from(value: SubmatrixMut<'a, V, T>) -> Self
fn from(value: SubmatrixMut<'a, V, T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, V, T> Freeze for SubmatrixMut<'a, V, T>
impl<'a, V, T> RefUnwindSafe for SubmatrixMut<'a, V, T>where
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, V, T> Send for SubmatrixMut<'a, V, T>
impl<'a, V, T> Sync for SubmatrixMut<'a, V, T>
impl<'a, V, T> Unpin for SubmatrixMut<'a, V, T>
impl<'a, V, T> !UnwindSafe for SubmatrixMut<'a, V, T>
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> 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