pub struct SparseCOO {
pub shape: (usize, usize),
pub row_indices: Vec<usize>,
pub col_indices: Vec<usize>,
pub values: Vec<f64>,
}Expand description
Sparse matrix in COO (Coordinate) format.
Storage: O(nnz) where nnz is the number of non-zero elements Random access: O(nnz) Best for: Construction and modification
Fields§
§shape: (usize, usize)Shape of the matrix (rows, cols)
row_indices: Vec<usize>Row indices
col_indices: Vec<usize>Column indices
values: Vec<f64>Values
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SparseCOO
impl<'de> Deserialize<'de> for SparseCOO
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for SparseCOO
Auto Trait Implementations§
impl Freeze for SparseCOO
impl RefUnwindSafe for SparseCOO
impl Send for SparseCOO
impl Sync for SparseCOO
impl Unpin for SparseCOO
impl UnwindSafe for SparseCOO
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