pub struct SparseMatrix<T> { /* private fields */ }Trait Implementations§
Source§impl<T: Clone> Clone for SparseMatrix<T>
impl<T: Clone> Clone for SparseMatrix<T>
Source§fn clone(&self) -> SparseMatrix<T>
fn clone(&self) -> SparseMatrix<T>
Returns a copy 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<T: Debug> Debug for SparseMatrix<T>
impl<T: Debug> Debug for SparseMatrix<T>
Source§impl<T: PartialEq> PartialEq for SparseMatrix<T>
impl<T: PartialEq> PartialEq for SparseMatrix<T>
Source§impl<T> SparseTensor<T, MatrixAddress> for SparseMatrix<T>
impl<T> SparseTensor<T, MatrixAddress> for SparseMatrix<T>
Source§fn new(address_value_map: HashMap<MatrixAddress, T>) -> SparseMatrix<T>
fn new(address_value_map: HashMap<MatrixAddress, T>) -> SparseMatrix<T>
Creates a new instance of a sparse tensor given the address-value-map
Source§fn get(&self, address: &MatrixAddress) -> Option<&T>
fn get(&self, address: &MatrixAddress) -> Option<&T>
Attempts to retrieve a reference to the value at the address.
Returns None if the address is outside the given bound
fn get_mut(&mut self, address: &MatrixAddress) -> Option<&mut T>
Source§fn set(&mut self, address: &MatrixAddress, value: T) -> Option<T>
fn set(&mut self, address: &MatrixAddress, value: T) -> Option<T>
Attempts to reassign the value at the given index. Returns Err if the given address is out of bounds.
Source§fn iter(&self) -> Iter<'_, MatrixAddress, T>
fn iter(&self) -> Iter<'_, MatrixAddress, T>
Returns an Address-Value Iterator of all Address Value Pairs stored in the Sparse Tensor
Source§fn iter_mut(&mut self) -> IterMut<'_, MatrixAddress, T>
fn iter_mut(&mut self) -> IterMut<'_, MatrixAddress, T>
Returns a Mutable Address-Value Iterator of all Address Value Pairs stored in the Sparse Tensor
impl<T> StructuralPartialEq for SparseMatrix<T>
Auto Trait Implementations§
impl<T> Freeze for SparseMatrix<T>
impl<T> RefUnwindSafe for SparseMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for SparseMatrix<T>where
T: Send,
impl<T> Sync for SparseMatrix<T>where
T: Sync,
impl<T> Unpin for SparseMatrix<T>where
T: Unpin,
impl<T> UnwindSafe for SparseMatrix<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