pub trait CsStorage<T, R, C = Const<1>>: for<'a> CsStorageIter<'a, T, R, C> {
    // Required methods
    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§

source

fn shape(&self) -> (R, C)

The shape of the stored matrix.

source

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.

source

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.

source

fn get_value(&self, i: usize) -> &T

The i-th value on the contiguous value buffer of this storage.

source

fn row_index(&self, i: usize) -> usize

Retrieve the i-th row index of the underlying row index buffer.

source

fn column_range(&self, i: usize) -> Range<usize>

The value indices for the i-th column.

source

fn len(&self) -> usize

The size of the value buffer (i.e. the entries known as possibly being non-zero).

Implementors§

source§

impl<T, R, C> CsStorage<T, R, C> for CsVecStorage<T, R, C>where T: Scalar, R: Dim, C: Dim, DefaultAllocator: Allocator<usize, C, Const<1>>,