pub struct SparseMatrix {
pub nrows: usize,
pub ncols: usize,
pub row_ptr: Vec<usize>,
pub col_idx: Vec<usize>,
pub values: Vec<f64>,
}Expand description
Sparse matrix in Compressed Sparse Row (CSR) format.
row_ptr[i]..row_ptr[i+1] gives the range of column indices/values for row i.
Fields§
§nrows: usizeNumber of rows.
ncols: usizeNumber of columns.
row_ptr: Vec<usize>Row pointers (length nrows + 1).
col_idx: Vec<usize>Column indices of non-zero entries.
values: Vec<f64>Non-zero values.
Implementations§
Source§impl SparseMatrix
impl SparseMatrix
Auto Trait Implementations§
impl Freeze for SparseMatrix
impl RefUnwindSafe for SparseMatrix
impl Send for SparseMatrix
impl Sync for SparseMatrix
impl Unpin for SparseMatrix
impl UnsafeUnpin for SparseMatrix
impl UnwindSafe for SparseMatrix
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