pub struct MatMut<'a, S: TropicalSemiring> { /* private fields */ }Expand description
Mutable view over semiring data.
Unlike MatRef, this holds mutable references to semiring values,
not scalars. This is used for in-place operations.
Implementations§
Source§impl<'a, S: TropicalSemiring> MatMut<'a, S>
impl<'a, S: TropicalSemiring> MatMut<'a, S>
Sourcepub fn from_slice(data: &'a mut [S], nrows: usize, ncols: usize) -> Self
pub fn from_slice(data: &'a mut [S], nrows: usize, ncols: usize) -> Self
Create a mutable matrix reference from a slice.
Sourcepub fn as_mut_slice(&mut self) -> &mut [S]
pub fn as_mut_slice(&mut self) -> &mut [S]
Get the underlying data as a mutable slice.
Sourcepub fn as_mut_ptr(&mut self) -> *mut S
pub fn as_mut_ptr(&mut self) -> *mut S
Get a mutable pointer to the data.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for MatMut<'a, S>
impl<'a, S> RefUnwindSafe for MatMut<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for MatMut<'a, S>
impl<'a, S> Sync for MatMut<'a, S>
impl<'a, S> Unpin for MatMut<'a, S>
impl<'a, S> !UnwindSafe for MatMut<'a, S>
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