SymbolicSparseColMat

Type Alias SymbolicSparseColMat 

Source
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

see SymbolicSparseColMatRef

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>

Source

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.

Source

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.

Source

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.

Source

pub fn parts(&self) -> (Rows, Cols, &[I], Option<&[I]>, &[I])

Source

pub fn into_parts(self) -> (Rows, Cols, Vec<I>, Option<Vec<I>>, Vec<I>)

Source

pub fn nrows(&self) -> Rows

returns the number of rows of the matrix

Source

pub fn ncols(&self) -> Cols

returns the number of columns of the matrix

Source

pub fn shape(&self) -> (Rows, Cols)

returns the number of rows and columns of the matrix

Source

pub fn transpose(&self) -> SymbolicSparseRowMatRef<'_, I, Cols, Rows>

returns a view over the transpose of self

Source

pub fn into_transpose(self) -> SymbolicSparseRowMat<I, Cols, Rows>

returns the transpose of self

Source

pub fn to_owned(&self) -> Result<SymbolicSparseColMat<I, Rows, Cols>, FaerError>

Source

pub fn to_row_major( &self, ) -> Result<SymbolicSparseRowMat<I, Rows, Cols>, FaerError>

Source

pub fn compute_nnz(&self) -> usize

Source

pub fn col_ptr(&self) -> &[I]

Source

pub fn col_nnz(&self) -> Option<&[I]>

Source

pub fn row_idx(&self) -> &[I]

Source

pub fn col_range(&self, j: Idx<Cols>) -> Range<usize>

Source

pub unsafe fn col_range_unchecked(&self, j: Idx<Cols>) -> Range<usize>

Source

pub fn row_idx_of_col_raw(&self, j: Idx<Cols>) -> &[Idx<Rows, I>]

Source

pub fn row_idx_of_col( &self, j: Idx<Cols>, ) -> impl '_ + Clone + ExactSizeIterator + DoubleEndedIterator<Item = Idx<Rows>>

Source

pub fn as_shape<V: Shape, H: Shape>( &self, nrows: V, ncols: H, ) -> SymbolicSparseColMatRef<'_, I, V, H>

Source

pub fn into_shape<V: Shape, H: Shape>( self, nrows: V, ncols: H, ) -> SymbolicSparseColMat<I, V, H>

Source

pub fn as_dyn(&self) -> SymbolicSparseColMatRef<'_, I>

Source

pub fn into_dyn(self) -> SymbolicSparseColMat<I>

Source

pub fn as_ref(&self) -> SymbolicSparseColMatRef<'_, I, Rows, Cols>

Returns a view over the symbolic structure of self.

Source

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

Source

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