Struct nalgebra_sparse::csc::CscColMut
source · 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§
source§impl<'a, T: PartialEq> PartialEq<CscColMut<'a, T>> for CscColMut<'a, T>
impl<'a, T: PartialEq> PartialEq<CscColMut<'a, T>> for CscColMut<'a, T>
impl<'a, T: Eq> Eq for CscColMut<'a, T>
impl<'a, T> StructuralEq for CscColMut<'a, T>
impl<'a, T> StructuralPartialEq for CscColMut<'a, T>
Auto Trait Implementations§
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<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.