pub type SymbolicSparseColMat<I, Rows = usize, Cols = usize> = SymbolicSparseColMat<Own<I, Rows, Cols>>;Expand description
owning symbolic structure of sparse matrix in column format, either compressed or uncompressed
Aliased Type§
#[repr(transparent)]pub struct SymbolicSparseColMat<I, Rows = usize, Cols = usize>(pub Own<I, Rows, Cols>);Tuple Fields§
§0: Own<I, Rows, Cols>Implementations§
Source§impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<I, Rows, Cols>
impl<Rows: Shape, Cols: Shape, I: Index> SymbolicSparseColMat<I, Rows, Cols>
Sourcepub unsafe fn new_unchecked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub unsafe fn new_unchecked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view without checking its invariants
§safety
see type level documentation.
Sourcepub fn new_checked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub fn new_checked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view after checking its invariants
§safety
see type level documentation.
Sourcepub fn new_unsorted_checked(
nrows: Rows,
ncols: Cols,
col_ptr: Vec<I>,
col_nnz: Option<Vec<I>>,
row_idx: Vec<I>,
) -> Self
pub fn new_unsorted_checked( nrows: Rows, ncols: Cols, col_ptr: Vec<I>, col_nnz: Option<Vec<I>>, row_idx: Vec<I>, ) -> Self
creates a new symbolic matrix view after checking its invariants (excluding soft invariants)
§safety
see type level documentation.
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 into_transpose(self) -> SymbolicSparseRowMat<I, Cols, Rows>
pub fn into_transpose(self) -> SymbolicSparseRowMat<I, Cols, Rows>
returns 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 into_shape<V: Shape, H: Shape>(
self,
nrows: V,
ncols: H,
) -> SymbolicSparseColMat<I, V, H>
pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseColMat<I, V, H>
Sourcepub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
pub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>
Sourcepub fn into_dyn(self) -> SymbolicSparseColMat<I>
pub fn into_dyn(self) -> SymbolicSparseColMat<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.
Sourcepub fn try_new_from_indices(
nrows: Rows,
ncols: Cols,
idx: &[Pair<Idx<Rows, I>, Idx<Cols, I>>],
) -> Result<(Self, Argsort<I>), CreationError>
pub fn try_new_from_indices( nrows: Rows, ncols: Cols, idx: &[Pair<Idx<Rows, I>, Idx<Cols, I>>], ) -> Result<(Self, Argsort<I>), CreationError>
create a new symbolic structure, and the corresponding order for the numerical values from pairs of indices
Sourcepub fn try_new_from_nonnegative_indices(
nrows: Rows,
ncols: Cols,
idx: &[Pair<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>>],
) -> Result<(Self, Argsort<I>), CreationError>
pub fn try_new_from_nonnegative_indices( nrows: Rows, ncols: Cols, idx: &[Pair<MaybeIdx<Rows, I>, MaybeIdx<Cols, I>>], ) -> Result<(Self, Argsort<I>), CreationError>
create a new symbolic structure, and the corresponding order for the numerical values from pairs of indices
negative indices are ignored