pub type SparseRowMatMut<'a, I, T, Rows = usize, Cols = usize> = SparseRowMat<Mut<'a, I, T, Rows, Cols>>;Expand description
view over sparse row major matrix
Aliased Type§
#[repr(transparent)]pub struct SparseRowMatMut<'a, I, T, Rows = usize, Cols = usize>(pub Mut<'a, I, T, Rows, Cols>);Tuple Fields§
§0: Mut<'a, I, T, Rows, Cols>Implementations§
Source§impl<'a, Rows: Shape, Cols: Shape, I: Index, T> SparseRowMatMut<'a, I, T, Rows, Cols>
impl<'a, Rows: Shape, Cols: Shape, I: Index, T> SparseRowMatMut<'a, I, T, Rows, Cols>
Sourcepub fn new(
symbolic: SymbolicSparseRowMatRef<'a, I, Rows, Cols>,
val: &'a mut [T],
) -> Self
pub fn new( symbolic: SymbolicSparseRowMatRef<'a, I, Rows, Cols>, val: &'a mut [T], ) -> Self
Sourcepub fn parts(self) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a [T])
pub fn parts(self) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a [T])
Sourcepub fn parts_mut(
self,
) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a mut [T])
pub fn parts_mut( self, ) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a mut [T])
Sourcepub fn symbolic(&self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
pub fn symbolic(&self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
Sourcepub fn val_of_row(self, i: Idx<Rows>) -> &'a [T]
pub fn val_of_row(self, i: Idx<Rows>) -> &'a [T]
Sourcepub fn val_of_row_mut(self, j: Idx<Rows>) -> &'a mut [T]
pub fn val_of_row_mut(self, j: Idx<Rows>) -> &'a mut [T]
Sourcepub fn as_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SparseRowMatRef<'a, I, T, V, H>
pub fn as_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SparseRowMatRef<'a, I, T, V, H>
Sourcepub fn as_shape_mut<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SparseRowMatMut<'a, I, T, V, H>
pub fn as_shape_mut<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SparseRowMatMut<'a, I, T, V, H>
Sourcepub fn get_mut(self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&'a mut T>
pub fn get_mut(self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&'a mut T>
returns a reference to the value at the given index, or None if the symbolic structure
doesn’t contain it, or contains multiple indices with the given index
§panics
- panics if
row >= self.nrows() - panics if
col >= self.ncols()seeSparseRowMatRef::get
Sourcepub fn as_dyn(self) -> SparseRowMatRef<'a, I, T>
pub fn as_dyn(self) -> SparseRowMatRef<'a, I, T>
Sourcepub fn as_dyn_mut(self) -> SparseRowMatMut<'a, I, T>
pub fn as_dyn_mut(self) -> SparseRowMatMut<'a, I, T>
Sourcepub fn transpose(self) -> SparseColMatRef<'a, I, T, Cols, Rows>
pub fn transpose(self) -> SparseColMatRef<'a, I, T, Cols, Rows>
Sourcepub fn transpose_mut(self) -> SparseColMatMut<'a, I, T, Cols, Rows>
pub fn transpose_mut(self) -> SparseColMatMut<'a, I, T, Cols, Rows>
Sourcepub fn conjugate(self) -> SparseRowMatRef<'a, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate(self) -> SparseRowMatRef<'a, I, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn conjugate_mut(self) -> SparseRowMatMut<'a, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate_mut(self) -> SparseRowMatMut<'a, I, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn adjoint(self) -> SparseColMatRef<'a, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint(self) -> SparseColMatRef<'a, I, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn adjoint_mut(self) -> SparseColMatMut<'a, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint_mut(self) -> SparseColMatMut<'a, I, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn canonical(self) -> SparseRowMatRef<'a, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical(self) -> SparseRowMatRef<'a, I, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn canonical_mut(self) -> SparseRowMatMut<'a, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical_mut(self) -> SparseRowMatMut<'a, I, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn to_col_major(
&self,
) -> Result<SparseColMat<I, T::Canonical, Rows, Cols>, FaerError>where
T: Conjugate,
pub fn to_col_major(
&self,
) -> Result<SparseColMat<I, T::Canonical, Rows, Cols>, FaerError>where
T: Conjugate,
Methods from Deref<Target = SymbolicSparseRowMatRef<'a, I, 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 to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self
Sourcepub fn to_col_major(
&self,
) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_col_major( &self, ) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self in column major format
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
returns the number of non-zero elements in the matrix
Sourcepub fn row_range(&self, i: Idx<Rows>) -> Range<usize>
pub fn row_range(&self, i: Idx<Rows>) -> Range<usize>
returns the range specifying the indices of row i
Sourcepub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
pub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
returns the range specifying the indices of row i, without bound checks
Sourcepub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &'a [Idx<Cols, I>] ⓘ
pub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &'a [Idx<Cols, I>] ⓘ
returns the column indices of row i
Sourcepub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>where
Rows: 'a,
Cols: 'a,
pub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>where
Rows: 'a,
Cols: 'a,
returns the column indices of row i
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
Sourcepub fn transpose(&self) -> SymbolicSparseColMatRef<'_, I, Cols, Rows>
pub fn transpose(&self) -> SymbolicSparseColMatRef<'_, I, Cols, Rows>
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
Sourcepub fn to_col_major(
&self,
) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_col_major( &self, ) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
Sourcepub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
pub unsafe fn row_range_unchecked(&self, i: Idx<Rows>) -> Range<usize>
Sourcepub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &[Idx<Cols, I>] ⓘ
pub fn col_idx_of_row_raw(&self, i: Idx<Rows>) -> &[Idx<Cols, I>] ⓘ
Sourcepub fn col_idx_of_row(
&self,
i: Idx<Rows>,
) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>
pub fn col_idx_of_row( &self, i: Idx<Rows>, ) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Cols>>
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SymbolicSparseRowMatRef<'_, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SymbolicSparseRowMatRef<'_, I, V, H>
Sourcepub fn as_dyn(&self) -> SymbolicSparseRowMatRef<'_, I>
pub fn as_dyn(&self) -> SymbolicSparseRowMatRef<'_, I>
Sourcepub fn as_ref(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>
pub fn as_ref(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>
Returns a view over the symbolic structure of self.
Trait Implementations§
Source§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMatMut<'_, I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMatMut<'_, I, ViewT>
Source§fn transpose_apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
fn transpose_apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
computes the workspace size and alignment required to apply the transpose or adjoint o
self to a matrix with rhs_ncols columnsSource§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMatMut<'_, I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMatMut<'_, I, 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
computes the workspace size and alignment required to apply the transpose or adjoint of
self to a matrix with rhs_ncols columns in placeSource§impl<Rows: Shape, Cols: Shape, I: Index, T: Debug> Debug for SparseRowMatMut<'_, I, T, Rows, Cols>
impl<Rows: Shape, Cols: Shape, I: Index, T: Debug> Debug for SparseRowMatMut<'_, I, T, Rows, Cols>
Source§impl<'a, Rows: Shape, Cols: Shape, I: Index, T> Deref for SparseRowMatMut<'a, I, T, Rows, Cols>
impl<'a, Rows: Shape, Cols: Shape, I: Index, T> Deref for SparseRowMatMut<'a, I, T, Rows, Cols>
Source§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatMut<'_, I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatMut<'_, I, ViewT>
Source§fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
fn apply_scratch(&self, rhs_ncols: usize, par: Par) -> StackReq
computes the workspace size and alignment required to apply
self or the conjugate o
self to a matrix with rhs_ncols columnsSource§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseRowMatMut<'_, I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseRowMatMut<'_, I, 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
computes the workspace size and alignment required to apply
self or the conjugate of
self to a matrix with rhs_ncols columns in place