pub struct TriangularMut<'a, T: Scalar> { /* private fields */ }Expand description
A mutable reference to triangular packed data.
Implementations§
Source§impl<'a, T: Scalar> TriangularMut<'a, T>
impl<'a, T: Scalar> TriangularMut<'a, T>
Sourcepub fn new(packed: PackedMut<'a, T>, diag: DiagonalKind) -> Self
pub fn new(packed: PackedMut<'a, T>, diag: DiagonalKind) -> Self
Creates a new mutable triangular reference.
Sourcepub fn from_slice(
data: &'a mut [T],
n: usize,
uplo: TriangularKind,
diag: DiagonalKind,
) -> Self
pub fn from_slice( data: &'a mut [T], n: usize, uplo: TriangularKind, diag: DiagonalKind, ) -> Self
Creates from a mutable slice.
Sourcepub fn uplo(&self) -> TriangularKind
pub fn uplo(&self) -> TriangularKind
Returns the triangular kind.
Sourcepub fn diag(&self) -> DiagonalKind
pub fn diag(&self) -> DiagonalKind
Returns the diagonal kind.
Sourcepub fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut T>
pub fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut T>
Returns mutable element at (row, col).
Sourcepub fn set(&mut self, row: usize, col: usize, value: T)
pub fn set(&mut self, row: usize, col: usize, value: T)
Sets element at (row, col).
§Panics
Panics if (row, col) is outside the stored triangle, or if
setting the diagonal on a unit triangular matrix.
Sourcepub fn rb(&self) -> TriangularRef<'_, T>
pub fn rb(&self) -> TriangularRef<'_, T>
Creates an immutable reborrow.
Sourcepub fn rb_mut(&mut self) -> TriangularMut<'_, T>
pub fn rb_mut(&mut self) -> TriangularMut<'_, T>
Creates a mutable reborrow.
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for TriangularMut<'a, T>
impl<'a, T> Freeze for TriangularMut<'a, T>
impl<'a, T> RefUnwindSafe for TriangularMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for TriangularMut<'a, T>
impl<'a, T> Sync for TriangularMut<'a, T>
impl<'a, T> Unpin for TriangularMut<'a, T>
impl<'a, T> UnsafeUnpin for TriangularMut<'a, T>
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.