Type Definition sprs::CsMatViewI

source ·
pub type CsMatViewI<'a, N, I, Iptr = I> = CsMatBase<N, I, &'a [Iptr], &'a [I], &'a [N], Iptr>;

Implementations§

source§

impl<'a, N: 'a, I: 'a + SpIndex, Iptr: 'a + SpIndex> CsMatViewI<'a, N, I, Iptr>

Constructor methods for sparse matrix views

These constructors can be used to create views over non-matrix data such as slices.

source

pub fn middle_outer_views( &self, i: usize, count: usize ) -> CsMatViewI<'a, N, I, Iptr>

👎Deprecated since 0.10.0: Please use the slice_outer method instead

Get a view into count contiguous outer dimensions, starting from i.

eg this gets the rows from i to i + count in a CSR matrix

This function is now deprecated, as using an index and a count is not ergonomic. The replacement, slice_outer, leverages the std::ops::Range family of types, which is better integrated into the ecosystem.

source

pub fn iter_rbr(&self) -> CsIter<'a, N, I, Iptr>

Get an iterator that yields the non-zero locations and values stored in this matrix, in the fastest iteration order.

This method will yield the correct lifetime for iterating over a sparse matrix view.

source§

impl<'a, N, I, Iptr> CsMatViewI<'a, N, I, Iptr>where I: SpIndex, Iptr: SpIndex,

source

pub fn slice_outer_rbr<S>(&self, range: S) -> CsMatViewI<'a, N, I, Iptr>where S: Range,

Slice the outer dimension of the matrix according to the specified range.

Trait Implementations§

source§

impl<'a, N, I, Iptr> IntoIterator for CsMatViewI<'a, N, I, Iptr>where I: 'a + SpIndex, Iptr: 'a + SpIndex, N: 'a,

§

type Item = (&'a N, (I, I))

The type of the elements being iterated over.
§

type IntoIter = CsIter<'a, N, I, Iptr>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more