pub struct SparseMatrix<F> { /* private fields */ }Expand description
A sparse matrix indexed by (row, column).
Missing entries are treated as 0.
Implementations§
Source§impl<F> SparseMatrix<F>
impl<F> SparseMatrix<F>
Trait Implementations§
Source§impl<F: Additive> Default for SparseMatrix<F>
impl<F: Additive> Default for SparseMatrix<F>
Source§impl<F: EncodeSize> EncodeSize for SparseMatrix<F>
impl<F: EncodeSize> EncodeSize for SparseMatrix<F>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
Returns the encoded size excluding bytes passed to
BufsMut::push
during Write::write_bufs. Used to size the working buffer for inline
writes. Override alongside Write::write_bufs for types where large
Bytes fields go via push; failing to do so will over-allocate.Source§impl<F> IntoIterator for SparseMatrix<F>
impl<F> IntoIterator for SparseMatrix<F>
Source§impl<F: Write> Write for SparseMatrix<F>
impl<F: Write> Write for SparseMatrix<F>
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
Writes to a
BufsMut, allowing existing Bytes chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.Auto Trait Implementations§
impl<F> Freeze for SparseMatrix<F>where
F: Freeze,
impl<F> RefUnwindSafe for SparseMatrix<F>where
F: RefUnwindSafe,
impl<F> Send for SparseMatrix<F>where
F: Send,
impl<F> Sync for SparseMatrix<F>where
F: Sync,
impl<F> Unpin for SparseMatrix<F>where
F: Unpin,
impl<F> UnsafeUnpin for SparseMatrix<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for SparseMatrix<F>where
F: UnwindSafe + RefUnwindSafe,
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> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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