pub type SparseRowMatRef<'a, I, T, Rows = usize, Cols = usize> = SparseRowMat<Ref<'a, I, T, Rows, Cols>>;Expand description
view over sparse row major matrix
Aliased Type§
#[repr(transparent)]pub struct SparseRowMatRef<'a, I, T, Rows = usize, Cols = usize>(/* private fields */);Implementations§
Source§impl<'a, Rows: Shape, Cols: Shape, I: Index, T> SparseRowMatRef<'a, I, T, Rows, Cols>
impl<'a, Rows: Shape, Cols: Shape, I: Index, T> SparseRowMatRef<'a, I, T, Rows, Cols>
Sourcepub fn new(
symbolic: SymbolicSparseRowMatRef<'a, I, Rows, Cols>,
val: &'a [T],
) -> Self
pub fn new( symbolic: SymbolicSparseRowMatRef<'a, I, Rows, Cols>, val: &'a [T], ) -> Self
creates a new sparse matrix view.
§panics
panics if the length of values is not equal to the length of
symbolic.col_idx()
Sourcepub fn parts(self) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a [T])
pub fn parts(self) -> (SymbolicSparseRowMatRef<'a, I, Rows, Cols>, &'a [T])
returns the symbolic and numeric components of the sparse matrix
Sourcepub fn symbolic(&self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
pub fn symbolic(&self) -> SymbolicSparseRowMatRef<'a, I, Rows, Cols>
returns the symbolic component of the sparse matrix
Sourcepub fn val_of_row(self, i: Idx<Rows>) -> &'a [T]
pub fn val_of_row(self, i: Idx<Rows>) -> &'a [T]
returns a view over the values of row i
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>
returns the input matrix with the given shape after checking that it matches the current shape
Sourcepub fn get(self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&'a T>
pub fn get(self, row: Idx<Rows>, col: Idx<Cols>) -> Option<&'a 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()
Sourcepub fn as_dyn(self) -> SparseRowMatRef<'a, I, T>
pub fn as_dyn(self) -> SparseRowMatRef<'a, I, T>
returns the input matrix with dynamic shape
Sourcepub fn as_ref(self) -> SparseRowMatRef<'a, I, T, Rows, Cols>
pub fn as_ref(self) -> SparseRowMatRef<'a, I, T, Rows, Cols>
returns a view over self
Sourcepub fn transpose(self) -> SparseColMatRef<'a, I, T, Cols, Rows>
pub fn transpose(self) -> SparseColMatRef<'a, I, T, Cols, Rows>
returns a view over the transpose of self
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,
returns a view over the conjugate of self
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,
returns a view over the adjoint of self
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,
returns an unconjugated view over self
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,
returns a newly allocated matrix holding the (possibly conjugated)
values of self in column major format
Trait Implementations§
Source§impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMatRef<'_, I, ViewT>
impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMatRef<'_, 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
self to a matrix with rhs_ncols columnsSource§impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMatRef<'_, I, ViewT>
impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMatRef<'_, 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
self to a matrix with rhs_ncols columns in placeSource§impl<Rows: Shape, Cols: Shape, I: Index, T: Debug> Debug for SparseRowMatRef<'_, I, T, Rows, Cols>
impl<Rows: Shape, Cols: Shape, I: Index, T: Debug> Debug for SparseRowMatRef<'_, I, T, Rows, Cols>
Source§impl<'a, Rows: Shape, Cols: Shape, I: Index, T> Deref for SparseRowMatRef<'a, I, T, Rows, Cols>
impl<'a, Rows: Shape, Cols: Shape, I: Index, T> Deref for SparseRowMatRef<'a, I, T, Rows, Cols>
Source§impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatRef<'_, I, ViewT>
impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMatRef<'_, I, 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, I: Index, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseRowMatRef<'_, I, ViewT>
impl<T: ComplexField, I: Index, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseRowMatRef<'_, 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
self or the conjugate
of self to a matrix with rhs_ncols columns in place