Type Definition sprs::CsVecViewI

source ·
pub type CsVecViewI<'a, N, I = usize> = CsVecBase<&'a [I], &'a [N], N, I>;

Implementations§

source§

impl<'a, N: 'a, I: 'a + SpIndex> CsVecViewI<'a, N, I>

source

pub fn get_rbr(&self, index: usize) -> Option<&'a N>

Access element at given index, with logarithmic complexity

Re-borrowing version of at().

Trait Implementations§

source§

impl<'a, N: 'a, I> IntoSparseVecIter<'a, N> for CsVecViewI<'a, N, I>where I: SpIndex + 'a,

§

type IterType = VectorIterator<'a, N, I>

source§

fn dim(&self) -> usize

The dimension of the vector
source§

fn into_sparse_vec_iter(self) -> VectorIterator<'a, N, I>

Transform self into an iterator that yields (usize, &N) tuples where the usize is the index of the value in the sparse vector. The indices should be sorted.
source§

fn is_dense(&self) -> bool

Indicator to check whether the vector is actually dense
source§

fn index(self, idx: usize) -> &'a Nwhere Self: Sized,

Random access to an element in the vector. Read more