pub struct CsrMatrix<T> { /* private fields */ }
Expand description
A sparse matrix stored in the compressed sparse row format.
Implementations§
Trait Implementations§
source§impl<T: Clone + Default + Send + Sync> Matrix<T> for CsrMatrix<T>
impl<T: Clone + Default + Send + Sync> Matrix<T> for CsrMatrix<T>
fn width(&self) -> usize
fn height(&self) -> usize
type Row<'a> = <Vec<T> as IntoIterator>::IntoIter where Self: 'a
fn get(&self, r: usize, c: usize) -> T
fn row(&self, r: usize) -> Self::Row<'_>
fn dimensions(&self) -> Dimensions
fn rows(&self) -> impl Iterator<Item = Self::Row<'_>>
fn par_rows(&self) -> impl IndexedParallelIterator<Item = Self::Row<'_>>
fn row_slice(&self, r: usize) -> impl Deref<Target = [T]>
fn first_row(&self) -> Self::Row<'_>
fn last_row(&self) -> Self::Row<'_>
fn to_row_major_matrix(self) -> RowMajorMatrix<T>
fn horizontally_packed_row<'a, P>(
&'a self,
r: usize,
) -> (impl Iterator<Item = P>, impl Iterator<Item = T>)where
P: PackedValue<Value = T>,
T: Clone + 'a,
source§fn vertically_packed_row<P>(&self, r: usize) -> impl Iterator<Item = P>where
P: PackedValue<Value = T>,
fn vertically_packed_row<P>(&self, r: usize) -> impl Iterator<Item = P>where
P: PackedValue<Value = T>,
Wraps at the end.
fn vertically_strided(
self,
stride: usize,
offset: usize,
) -> VerticallyStridedMatrixView<Self>where
Self: Sized,
Auto Trait Implementations§
impl<T> Freeze for CsrMatrix<T>
impl<T> RefUnwindSafe for CsrMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for CsrMatrix<T>where
T: Send,
impl<T> Sync for CsrMatrix<T>where
T: Sync,
impl<T> Unpin for CsrMatrix<T>where
T: Unpin,
impl<T> UnwindSafe for CsrMatrix<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more