Struct nalgebra_sparse::csr::CsrRowMut
source · 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§
source§impl<'a, T: PartialEq> PartialEq<CsrRowMut<'a, T>> for CsrRowMut<'a, T>
impl<'a, T: PartialEq> PartialEq<CsrRowMut<'a, T>> for CsrRowMut<'a, T>
impl<'a, T: Eq> Eq for CsrRowMut<'a, T>
impl<'a, T> StructuralEq for CsrRowMut<'a, T>
impl<'a, T> StructuralPartialEq for CsrRowMut<'a, T>
Auto Trait Implementations§
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§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.