pub trait CsStorage<T, R, C = U1>: for<'a> CsStorageIter<'a, T, R, C> {
fn shape(&self) -> (R, C);
unsafe fn row_index_unchecked(&self, i: usize) -> usize;
unsafe fn get_value_unchecked(&self, i: usize) -> &T;
fn get_value(&self, i: usize) -> &T;
fn row_index(&self, i: usize) -> usize;
fn column_range(&self, i: usize) -> Range<usize>;
fn len(&self) -> usize;
}
Expand description
Trait for compressed column sparse matrix storage.
Required Methods
sourceunsafe fn row_index_unchecked(&self, i: usize) -> usize
unsafe fn row_index_unchecked(&self, i: usize) -> usize
Retrieve the i-th row index of the underlying row index buffer.
Safety
No bound-checking is performed.
sourceunsafe fn get_value_unchecked(&self, i: usize) -> &T
unsafe fn get_value_unchecked(&self, i: usize) -> &T
The i-th value on the contiguous value buffer of this storage.
Safety
No bound-checking is performed.
sourcefn get_value(&self, i: usize) -> &T
fn get_value(&self, i: usize) -> &T
The i-th value on the contiguous value buffer of this storage.
sourcefn row_index(&self, i: usize) -> usize
fn row_index(&self, i: usize) -> usize
Retrieve the i-th row index of the underlying row index buffer.
sourcefn column_range(&self, i: usize) -> Range<usize>
fn column_range(&self, i: usize) -> Range<usize>
The value indices for the i
-th column.