pub type SparseColMat<I, T, Rows = usize, Cols = usize> = SparseColMat<Own<I, T, Rows, Cols>>;Expand description
owning sparse column major matrix
Aliased Type§
#[repr(transparent)]pub struct SparseColMat<I, T, Rows = usize, Cols = usize>(pub Own<I, T, Rows, Cols>);Tuple Fields§
§0: Own<I, T, Rows, Cols>Implementations§
Source§impl<Rows: Shape, Cols: Shape, I: Index, T> SparseColMat<I, T, Rows, Cols>
impl<Rows: Shape, Cols: Shape, I: Index, T> SparseColMat<I, T, Rows, Cols>
Sourcepub fn new(symbolic: SymbolicSparseColMat<I, Rows, Cols>, val: Vec<T>) -> Self
pub fn new(symbolic: SymbolicSparseColMat<I, Rows, Cols>, val: Vec<T>) -> Self
Sourcepub fn parts(&self) -> (SymbolicSparseColMatRef<'_, I, Rows, Cols>, &[T])
pub fn parts(&self) -> (SymbolicSparseColMatRef<'_, I, Rows, Cols>, &[T])
Sourcepub fn parts_mut(
&mut self,
) -> (SymbolicSparseColMatRef<'_, I, Rows, Cols>, &mut [T])
pub fn parts_mut( &mut self, ) -> (SymbolicSparseColMatRef<'_, I, Rows, Cols>, &mut [T])
Sourcepub fn into_parts(self) -> (SymbolicSparseColMat<I, Rows, Cols>, Vec<T>)
pub fn into_parts(self) -> (SymbolicSparseColMat<I, Rows, Cols>, Vec<T>)
Sourcepub fn symbolic(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>
pub fn symbolic(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>
Sourcepub fn val_of_col(&self, j: Idx<Cols>) -> &[T]
pub fn val_of_col(&self, j: Idx<Cols>) -> &[T]
Sourcepub fn val_of_col_mut(&mut self, j: Idx<Cols>) -> &mut [T]
pub fn val_of_col_mut(&mut self, j: Idx<Cols>) -> &mut [T]
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SparseColMatRef<'_, I, T, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SparseColMatRef<'_, I, T, V, H>
Sourcepub fn as_shape_mut<V: Shape, H: Shape>(
&mut self,
nrows: V,
ncols: H,
) -> SparseColMatMut<'_, I, T, V, H>
pub fn as_shape_mut<V: Shape, H: Shape>( &mut self, nrows: V, ncols: H, ) -> SparseColMatMut<'_, I, T, V, H>
Sourcepub fn into_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SparseColMat<I, T, V, H>
pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SparseColMat<I, T, V, H>
Sourcepub fn as_dyn(&self) -> SparseColMatRef<'_, I, T>
pub fn as_dyn(&self) -> SparseColMatRef<'_, I, T>
Sourcepub fn as_dyn_mut(&mut self) -> SparseColMatMut<'_, I, T>
pub fn as_dyn_mut(&mut self) -> SparseColMatMut<'_, I, T>
Sourcepub fn into_dyn(self) -> SparseColMat<I, T>
pub fn into_dyn(self) -> SparseColMat<I, T>
Sourcepub fn as_ref(&self) -> SparseColMatRef<'_, I, T, Rows, Cols>
pub fn as_ref(&self) -> SparseColMatRef<'_, I, T, Rows, Cols>
Sourcepub fn transpose(&self) -> SparseRowMatRef<'_, I, T, Cols, Rows>
pub fn transpose(&self) -> SparseRowMatRef<'_, I, T, Cols, Rows>
Sourcepub fn transpose_mut(&mut self) -> SparseRowMatMut<'_, I, T, Cols, Rows>
pub fn transpose_mut(&mut self) -> SparseRowMatMut<'_, I, T, Cols, Rows>
Sourcepub fn into_transpose(self) -> SparseRowMat<I, T, Cols, Rows>
pub fn into_transpose(self) -> SparseRowMat<I, T, Cols, Rows>
Sourcepub fn conjugate(&self) -> SparseColMatRef<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate(&self) -> SparseColMatRef<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn conjugate_mut(&mut self) -> SparseColMatMut<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn conjugate_mut(&mut self) -> SparseColMatMut<'_, I, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn into_conjugate(self) -> SparseColMat<I, T::Conj, Rows, Cols>where
T: Conjugate,
pub fn into_conjugate(self) -> SparseColMat<I, T::Conj, Rows, Cols>where
T: Conjugate,
Sourcepub fn adjoint(&self) -> SparseRowMatRef<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint(&self) -> SparseRowMatRef<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn adjoint_mut(&mut self) -> SparseRowMatMut<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn adjoint_mut(&mut self) -> SparseRowMatMut<'_, I, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn into_adjoint(self) -> SparseRowMat<I, T::Conj, Cols, Rows>where
T: Conjugate,
pub fn into_adjoint(self) -> SparseRowMat<I, T::Conj, Cols, Rows>where
T: Conjugate,
Sourcepub fn canonical(&self) -> SparseColMatRef<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical(&self) -> SparseColMatRef<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn canonical_mut(
&mut self,
) -> SparseColMatMut<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn canonical_mut(
&mut self,
) -> SparseColMatMut<'_, I, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn into_canonical(self) -> SparseColMat<I, T::Canonical, Rows, Cols>where
T: Conjugate,
pub fn into_canonical(self) -> SparseColMat<I, T::Canonical, Rows, Cols>where
T: Conjugate,
Sourcepub fn to_row_major(
&self,
) -> Result<SparseRowMat<I, T::Canonical, Rows, Cols>, FaerError>where
T: Conjugate,
pub fn to_row_major(
&self,
) -> Result<SparseRowMat<I, T::Canonical, Rows, Cols>, FaerError>where
T: Conjugate,
Sourcepub fn new_from_argsort(
symbolic: SymbolicSparseColMat<I, Rows, Cols>,
argsort: &Argsort<I>,
val: &[T],
) -> Result<Self, FaerError>where
T: ComplexField,
pub fn new_from_argsort(
symbolic: SymbolicSparseColMat<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
Methods from Deref<Target = SymbolicSparseColMat<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<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self
Sourcepub fn to_row_major(
&self,
) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_row_major( &self, ) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
returns a newly allocated matrix holding the values of self in row 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 col_range(&self, j: Idx<Cols>) -> Range<usize>
pub fn col_range(&self, j: Idx<Cols>) -> Range<usize>
returns the range specifying the indices of column j
Sourcepub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
pub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
returns the range specifying the indices of column j, without bound checks
Sourcepub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &'a [Idx<Rows, I>] ⓘ
pub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &'a [Idx<Rows, I>] ⓘ
returns the row indices of column j
Sourcepub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>where
Rows: 'a,
Cols: 'a,
pub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl 'a + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>where
Rows: 'a,
Cols: 'a,
returns the row indices of column j
Sourcepub fn shape(&self) -> (Rows, Cols)
pub fn shape(&self) -> (Rows, Cols)
returns the number of rows and columns of the matrix
Sourcepub fn transpose(&self) -> SymbolicSparseRowMatRef<'_, I, Cols, Rows>
pub fn transpose(&self) -> SymbolicSparseRowMatRef<'_, I, Cols, Rows>
returns a view over the transpose of self
Sourcepub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
pub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>
Sourcepub fn to_row_major(
&self,
) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
pub fn to_row_major( &self, ) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>
Sourcepub fn compute_nnz(&self) -> usize
pub fn compute_nnz(&self) -> usize
Sourcepub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
pub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>
Sourcepub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &[Idx<Rows, I>] ⓘ
pub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &[Idx<Rows, I>] ⓘ
Sourcepub fn row_idx_of_col(
&self,
j: Idx<Cols>,
) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>
pub fn row_idx_of_col( &self, j: Idx<Cols>, ) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>
Sourcepub fn as_shape<V: Shape, H: Shape>(
&self,
nrows: V,
ncols: H,
) -> SymbolicSparseColMatRef<'_, I, V, H>
pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SymbolicSparseColMatRef<'_, I, V, H>
Sourcepub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
pub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
Sourcepub fn as_ref(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>
pub fn as_ref(&self) -> SymbolicSparseColMatRef<'_, 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 SparseColMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiLinOp<T> for SparseColMat<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<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseColMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> BiPrecond<T> for SparseColMat<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<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseColMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> LinOp<T> for SparseColMat<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<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseColMat<I, ViewT>
impl<I: Index, T: ComplexField, ViewT: Conjugate<Canonical = T>> Precond<T> for SparseColMat<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