pub struct CsrRowMut<'a, T> { /* private fields */ }
Expand description
A mutable representation of a row in a CSR matrix.
Note that only explicitly stored entries can be mutated. The sparsity pattern belonging to the row cannot be modified.
Implementations§
Source§impl<'a, T> CsrRowMut<'a, T>
impl<'a, T> CsrRowMut<'a, T>
Sourcepub fn col_indices(&self) -> &[usize]
pub fn col_indices(&self) -> &[usize]
The column indices corresponding to explicitly stored entries in this row.
Sourcepub fn values(&self) -> &[T]
pub fn values(&self) -> &[T]
The values corresponding to explicitly stored entries in this row.
Sourcepub fn get_entry(&self, global_col_index: usize) -> Option<SparseEntry<'_, T>>
pub fn get_entry(&self, global_col_index: usize) -> Option<SparseEntry<'_, T>>
Returns an entry for the given global column index.
Each call to this function incurs the cost of a binary search among the explicitly stored column entries.
Source§impl<'a, T> CsrRowMut<'a, T>
impl<'a, T> CsrRowMut<'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 row.
Sourcepub fn cols_and_values_mut(&mut self) -> (&[usize], &mut [T])
pub fn cols_and_values_mut(&mut self) -> (&[usize], &mut [T])
Provides simultaneous access to column indices and mutable values corresponding to the explicitly stored entries in this row.
This method primarily facilitates low-level access for methods that process data stored in CSR format directly.
Sourcepub fn get_entry_mut(
&mut self,
global_col_index: usize,
) -> Option<SparseEntryMut<'_, T>>
pub fn get_entry_mut( &mut self, global_col_index: usize, ) -> Option<SparseEntryMut<'_, T>>
Returns a mutable entry for the given global column index.
Trait Implementations§
impl<'a, T: Eq> Eq for CsrRowMut<'a, T>
impl<'a, T> StructuralPartialEq for CsrRowMut<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for CsrRowMut<'a, T>
impl<'a, T> RefUnwindSafe for CsrRowMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CsrRowMut<'a, T>where
T: Send,
impl<'a, T> Sync for CsrRowMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for CsrRowMut<'a, T>
impl<'a, T> !UnwindSafe for CsrRowMut<'a, T>
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
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.