pub enum SparseIndices {
COO {
row_indices: Vec<usize>,
col_indices: Vec<usize>,
},
CSR {
row_ptr: Vec<usize>,
col_indices: Vec<usize>,
},
CSC {
col_ptr: Vec<usize>,
row_indices: Vec<usize>,
},
BSR {
row_ptr: Vec<usize>,
col_indices: Vec<usize>,
block_shape: (usize, usize),
},
DOK {
indices_map: HashMap<(usize, usize), usize>,
},
}Expand description
Indices for different sparse formats
Variants§
COO
COO format: (row_indices, col_indices)
CSR
CSR format: (row_ptr, col_indices)
CSC
CSC format: (col_ptr, row_indices)
BSR
BSR format: (row_ptr, col_indices, block_shape)
DOK
DOK format: dictionary mapping (row, col) -> index
Trait Implementations§
Source§impl Clone for SparseIndices
impl Clone for SparseIndices
Source§fn clone(&self) -> SparseIndices
fn clone(&self) -> SparseIndices
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SparseIndices
impl Debug for SparseIndices
Source§impl<'de> Deserialize<'de> for SparseIndices
impl<'de> Deserialize<'de> for SparseIndices
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
Auto Trait Implementations§
impl Freeze for SparseIndices
impl RefUnwindSafe for SparseIndices
impl Send for SparseIndices
impl Sync for SparseIndices
impl Unpin for SparseIndices
impl UnsafeUnpin for SparseIndices
impl UnwindSafe for SparseIndices
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> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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