pub struct CSRMatrix<T: Clone> {
pub data: Vec<T>,
pub indices: Vec<usize>,
pub indptr: Vec<usize>,
pub shape: (usize, usize),
}Expand description
Compressed Sparse Row (CSR) format for efficient sparse matrix storage
Fields§
§data: Vec<T>Non-zero values stored in row-major order
indices: Vec<usize>Column indices for each non-zero value
indptr: Vec<usize>Pointers to the start of each row in data/indices
shape: (usize, usize)Matrix dimensions (rows, cols)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CSRMatrix<T>
impl<T> RefUnwindSafe for CSRMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for CSRMatrix<T>where
T: Send,
impl<T> Sync for CSRMatrix<T>where
T: Sync,
impl<T> Unpin for CSRMatrix<T>where
T: Unpin,
impl<T> UnwindSafe for CSRMatrix<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more