pub struct CscColMut<'a, T> { /* private fields */ }Expand description
A mutable representation of a column in a CSC matrix.
Note that only explicitly stored entries can be mutated. The sparsity pattern belonging to the column cannot be modified.
Implementations§
Source§impl<'a, T> CscColMut<'a, T>
impl<'a, T> CscColMut<'a, T>
Sourcepub fn row_indices(&self) -> &[usize]
pub fn row_indices(&self) -> &[usize]
The row indices corresponding to explicitly stored entries in this column.
Sourcepub fn values(&self) -> &[T]
pub fn values(&self) -> &[T]
The values corresponding to explicitly stored entries in this column.
Sourcepub fn get_entry(&self, global_row_index: usize) -> Option<SparseEntry<'_, T>>
pub fn get_entry(&self, global_row_index: usize) -> Option<SparseEntry<'_, T>>
Returns an entry for the given global row index.
Each call to this function incurs the cost of a binary search among the explicitly stored row entries.
Source§impl<'a, T> CscColMut<'a, T>
impl<'a, T> CscColMut<'a, T>
Sourcepub fn values_mut(&mut self) -> &mut [T]
pub fn values_mut(&mut self) -> &mut [T]
Mutable access to the values corresponding to explicitly stored entries in this column.
Sourcepub fn rows_and_values_mut(&mut self) -> (&[usize], &mut [T])
pub fn rows_and_values_mut(&mut self) -> (&[usize], &mut [T])
Provides simultaneous access to row indices and mutable values corresponding to the explicitly stored entries in this column.
This method primarily facilitates low-level access for methods that process data stored in CSC format directly.
Sourcepub fn get_entry_mut(
&mut self,
global_row_index: usize,
) -> Option<SparseEntryMut<'_, T>>
pub fn get_entry_mut( &mut self, global_row_index: usize, ) -> Option<SparseEntryMut<'_, T>>
Returns a mutable entry for the given global row index.
Trait Implementations§
impl<'a, T: Eq> Eq for CscColMut<'a, T>
impl<'a, T> StructuralPartialEq for CscColMut<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for CscColMut<'a, T>
impl<'a, T> RefUnwindSafe for CscColMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CscColMut<'a, T>where
T: Send,
impl<'a, T> Sync for CscColMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for CscColMut<'a, T>
impl<'a, T> !UnwindSafe for CscColMut<'a, T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.