pub struct CscMatrix<T> { /* private fields */ }Expand description
Sparse matrix in validated compressed sparse column (CSC) form.
Implementations§
Source§impl<T> CscMatrix<T>
impl<T> CscMatrix<T>
Sourcepub fn try_new(
nrows: usize,
ncols: usize,
col_ptrs: Vec<usize>,
row_indices: Vec<usize>,
values: Vec<T>,
) -> SparseResult<Self>
pub fn try_new( nrows: usize, ncols: usize, col_ptrs: Vec<usize>, row_indices: Vec<usize>, values: Vec<T>, ) -> SparseResult<Self>
Build a validated CSC matrix from owned parts.
pub fn nrows(&self) -> usize
pub fn ncols(&self) -> usize
pub fn nnz(&self) -> usize
pub fn is_square(&self) -> bool
pub fn col_ptrs(&self) -> &[usize]
pub fn row_indices(&self) -> &[usize]
pub fn values(&self) -> &[T]
pub fn values_mut(&mut self) -> &mut [T]
pub fn into_parts(self) -> (usize, usize, Vec<usize>, Vec<usize>, Vec<T>)
pub fn has_same_pattern<U>(&self, other: &CscMatrix<U>) -> bool
pub fn has_same_pattern_slices( &self, col_ptrs: &[usize], row_indices: &[usize], ) -> bool
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for CscMatrix<T>
Auto Trait Implementations§
impl<T> Freeze for CscMatrix<T>
impl<T> RefUnwindSafe for CscMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for CscMatrix<T>where
T: Send,
impl<T> Sync for CscMatrix<T>where
T: Sync,
impl<T> Unpin for CscMatrix<T>where
T: Unpin,
impl<T> UnsafeUnpin for CscMatrix<T>
impl<T> UnwindSafe for CscMatrix<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more