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>
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.
sourcepub 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
pub fn middle_outer_views( &self, i: usize, count: usize ) -> CsMatViewI<'a, N, I, Iptr>
slice_outer
method insteadGet 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§impl<'a, N, I, Iptr> CsMatViewI<'a, N, I, Iptr>where
I: SpIndex,
Iptr: SpIndex,
impl<'a, N, I, Iptr> CsMatViewI<'a, N, I, Iptr>where I: SpIndex, Iptr: SpIndex,
sourcepub fn slice_outer_rbr<S>(&self, range: S) -> CsMatViewI<'a, N, I, Iptr>where
S: Range,
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.