Type Definition sprs::CsMatViewI[][src]

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

Implementations

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

Constructor methods for sparse matrix views

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

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

👎 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.

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

Notable traits for CsIter<'a, N, I, Iptr>

impl<'a, N, I, Iptr> Iterator for CsIter<'a, N, I, Iptr> where
    I: SpIndex,
    Iptr: SpIndex,
    N: 'a, 
type Item = (&'a N, (I, I));
[src]

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.

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

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

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

Trait Implementations

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

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?