pub struct TriangularViewMut<'a, T: Scalar> { /* private fields */ }Expand description
A mutable triangular matrix view over dense storage.
Implementations§
Source§impl<'a, T: Scalar> TriangularViewMut<'a, T>
impl<'a, T: Scalar> TriangularViewMut<'a, T>
Sourcepub fn new(mat: MatMut<'a, T>, uplo: TriangularKind, diag: DiagonalKind) -> Self
pub fn new(mat: MatMut<'a, T>, uplo: TriangularKind, diag: DiagonalKind) -> Self
Creates a new mutable triangular view over a matrix.
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 in_triangle(&self, row: usize, col: usize) -> bool
pub fn in_triangle(&self, row: usize, col: usize) -> bool
Returns true if element is in stored triangle.
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 a mutable reference to element.
Sourcepub fn set(&mut self, row: usize, col: usize, value: T)
pub fn set(&mut self, row: usize, col: usize, value: T)
Sets an element in the stored triangle.
§Panics
Panics if the element is outside the stored triangle or on the diagonal for unit triangular matrices.
Sourcepub fn rb(&self) -> TriangularView<'_, T>
pub fn rb(&self) -> TriangularView<'_, T>
Creates an immutable reborrow.
Sourcepub fn rb_mut(&mut self) -> TriangularViewMut<'_, T>
pub fn rb_mut(&mut self) -> TriangularViewMut<'_, T>
Creates a mutable reborrow.
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Returns a mutable pointer to the data.
Sourcepub fn fill(&mut self, value: T)
pub fn fill(&mut self, value: T)
Fills the stored triangle with a value.
Does not modify the diagonal for unit triangular matrices.
Sourcepub fn zero_non_triangle(&mut self)where
T: Zero,
pub fn zero_non_triangle(&mut self)where
T: Zero,
Clears the non-stored triangle to zero.
Auto Trait Implementations§
impl<'a, T> Freeze for TriangularViewMut<'a, T>
impl<'a, T> RefUnwindSafe for TriangularViewMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for TriangularViewMut<'a, T>
impl<'a, T> Sync for TriangularViewMut<'a, T>
impl<'a, T> Unpin for TriangularViewMut<'a, T>
impl<'a, T> !UnwindSafe for TriangularViewMut<'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