pub type SparseRowMat<I, T, Rows = usize, Cols = usize> = SparseRowMat<Own<I, T, Rows, Cols>>;Expand description
owning sparse row major matrix
Aliased Type§
#[repr(transparent)]pub struct SparseRowMat<I, T, Rows = usize, Cols = usize>(/* private fields */);Implementations§
Source§impl<Rows: Shape, Cols: Shape, I: Index, T> SparseRowMat<I, T, Rows, Cols>
impl<Rows: Shape, Cols: Shape, I: Index, T> SparseRowMat<I, T, Rows, Cols>
Sourcepub fn new(symbolic: SymbolicSparseRowMat<I, Rows, Cols>, val: Vec<T>) -> Self
pub fn new(symbolic: SymbolicSparseRowMat<I, Rows, Cols>, val: Vec<T>) -> Self
see [SparseRowMatRef::new]
Sourcepub fn parts(&self) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &[T])
pub fn parts(&self) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &[T])
see [SparseRowMatRef::parts]
Sourcepub fn parts_mut(
&mut self,
) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &mut [T])
pub fn parts_mut( &mut self, ) -> (SymbolicSparseRowMatRef<'_, I, Rows, Cols>, &mut [T])
see [SparseRowMatRef::parts]
Sourcepub fn into_parts(self) -> (SymbolicSparseRowMat<I, Rows, Cols>, Vec<T>)
pub fn into_parts(self) -> (SymbolicSparseRowMat<I, Rows, Cols>, Vec<T>)
see [SparseRowMatRef::parts]
Sourcepub fn symbolic(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>
pub fn symbolic(&self) -> SymbolicSparseRowMatRef<'_, I, Rows, Cols>
see [SparseRowMatRef::symbolic]
Sourcepub fn val_of_row(&self, j: Idx<Rows>) -> &[T]
pub fn val_of_row(&self, j: Idx<Rows>) -> &[T]
see [SparseRowMatRef::val_of_row]
Sourcepub fn val_of_row_mut(&mut self, j: Idx<Rows>) -> &mut [T]
pub fn val_of_row_mut(&mut self, j: Idx<Rows>) -> &mut [T]
see [SparseRowMatRef::val_of_row]
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SparseRowMatRef<'_, I, T, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SparseRowMatRef<'_, I, T, V, H>
see [SparseRowMatRef::as_shape]
Sourcepub fn as_shape_mut<V: Shape, H: Shape>(
&mut self,
nrows: V,
ncols: H,
) -> SparseRowMatMut<'_, I, T, V, H>
pub fn as_shape_mut<V: Shape, H: Shape>( &mut self, nrows: V, ncols: H, ) -> SparseRowMatMut<'_, I, T, V, H>
see [SparseRowMatRef::as_shape]
Sourcepub fn into_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SparseRowMat<I, T, V, H>
pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SparseRowMat<I, T, V, H>
see [SparseRowMatRef::as_shape]
Sourcepub fn as_dyn(&self) -> SparseRowMatRef<'_, I, T>
pub fn as_dyn(&self) -> SparseRowMatRef<'_, I, T>
see [SparseRowMatRef::as_dyn]
Sourcepub fn as_dyn_mut(&mut self) -> SparseRowMatMut<'_, I, T>
pub fn as_dyn_mut(&mut self) -> SparseRowMatMut<'_, I, T>
see [SparseRowMatRef::as_dyn]
Sourcepub fn into_dyn(self) -> SparseRowMat<I, T>
pub fn into_dyn(self) -> SparseRowMat<I, T>
see [SparseRowMatRef::as_dyn]
Sourcepub fn as_ref(&self) -> SparseRowMatRef<'_, I, T, Rows, Cols>
pub fn as_ref(&self) -> SparseRowMatRef<'_, I, T, Rows, Cols>
see [SparseRowMatRef::as_ref]
Sourcepub fn transpose(&self) -> SparseColMatRef<'_, I, T, Cols, Rows>
pub fn transpose(&self) -> SparseColMatRef<'_, I, T, Cols, Rows>
see [SparseRowMatRef::transpose]
Sourcepub fn transpose_mut(&mut self) -> SparseColMatMut<'_, I, T, Cols, Rows>
pub fn transpose_mut(&mut self) -> SparseColMatMut<'_, I, T, Cols, Rows>
see [SparseRowMatRef::transpose]
Sourcepub fn into_transpose(self) -> SparseColMat<I, T, Cols, Rows>
pub fn into_transpose(self) -> SparseColMat<I, T, Cols, Rows>
see [SparseRowMatRef::transpose]
Sourcepub fn conjugate(&self) -> SparseRowMatRef<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate(&self) -> SparseRowMatRef<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::conjugate]
Sourcepub fn conjugate_mut(&mut self) -> SparseRowMatMut<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate_mut(&mut self) -> SparseRowMatMut<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::conjugate]
Sourcepub fn into_conjugate(self) -> SparseRowMat<I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn into_conjugate(self) -> SparseRowMat<I, T::Conj, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::conjugate]
Sourcepub fn adjoint(&self) -> SparseColMatRef<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint(&self) -> SparseColMatRef<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
see [SparseRowMatRef::adjoint]
Sourcepub fn adjoint_mut(&mut self) -> SparseColMatMut<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint_mut(&mut self) -> SparseColMatMut<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
see [SparseRowMatRef::adjoint]
Sourcepub fn into_adjoint(self) -> SparseColMat<I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn into_adjoint(self) -> SparseColMat<I, T::Conj, Cols, Rows>where
T: Conjugate,
see [SparseRowMatRef::adjoint]
Sourcepub fn canonical(&self) -> SparseRowMatRef<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical(&self) -> SparseRowMatRef<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::canonical]
Sourcepub fn canonical_mut(
&mut self,
) -> SparseRowMatMut<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical_mut(
&mut self,
) -> SparseRowMatMut<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::canonical]
Sourcepub fn into_canonical(self) -> SparseRowMat<I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn into_canonical(self) -> SparseRowMat<I, T::Canonical, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::canonical]
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,
see [SparseRowMatRef::to_col_major]
Sourcepub fn to_dense(&self) -> Mat<T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn to_dense(&self) -> Mat<T::Canonical, Rows, Cols>where
T: Conjugate,
see [SparseRowMatRef::to_dense]
Sourcepub fn new_from_argsort(
symbolic: SymbolicSparseRowMat<I, Rows, Cols>,
argsort: &Argsort<I>,
val: &[T],
) -> Result<Self, FaerError>where
T: ComplexField,
pub fn new_from_argsort(
symbolic: SymbolicSparseRowMat<I, Rows, Cols>,
argsort: &Argsort<I>,
val: &[T],
) -> Result<Self, FaerError>where
T: ComplexField,
create a new matrix from a previously created symbolic structure and value order
the provided values must correspond to the same indices that were provided in the function call from which the order was created
Sourcepub fn try_new_from_triplets(
nrows: Rows,
ncols: Cols,
entries: &[Triplet<Idx<Rows, I>, Idx<Cols, I>, T>],
) -> Result<Self, CreationError>where
T: ComplexField,
pub fn try_new_from_triplets(
nrows: Rows,
ncols: Cols,
entries: &[Triplet<Idx<Rows, I>, Idx<Cols, I>, T>],
) -> Result<Self, CreationError>where
T: ComplexField,
create a new matrix from triplets
Sourcepub fn try_new_from_nonnegative_triplets(
nrows: Rows,
ncols: Cols,
entries: &[Triplet<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>, T>],
) -> Result<Self, CreationError>where
T: ComplexField,
pub fn try_new_from_nonnegative_triplets(
nrows: Rows,
ncols: Cols,
entries: &[Triplet<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>, T>],
) -> Result<Self, CreationError>where
T: ComplexField,
create a new matrix from triplets
negative indices are ignored
Trait Implementations§
Source§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseRowMat<I, ViewT>
Source§fn transpose_apply_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
fn transpose_apply_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
self to a matrix with rhs_ncols columnsSource§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseRowMat<I, ViewT>
Source§fn transpose_apply_in_place_scratch(
&self,
rhs_ncols: usize,
par: ParShape,
) -> StackReq
fn transpose_apply_in_place_scratch( &self, rhs_ncols: usize, par: ParShape, ) -> StackReq
self to a matrix with rhs_ncols columns in placeSource§impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseRowMat<I, ViewT>
Source§fn apply_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
fn apply_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
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 SparseRowMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseRowMat<I, ViewT>
Source§fn apply_in_place_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
fn apply_in_place_scratch(&self, rhs_ncols: usize, par: ParShape) -> StackReq
self or the conjugate
of self to a matrix with rhs_ncols columns in place