pub struct Permutation<D>{ /* private fields */ }Expand description
describes an orthogonal permutation matrix P that can be used to permute
the rows or columns of an appropriately shaped matrix. Due to LAPACK
internals, an instance must be mutably borrowed when applying the
permutation, but the permutation itself will remain unchanged on success.
Note: the associated functions take Self by mutable reference due
to the LAPACK internal implementation of the permutation logic.
Implementations§
Source§impl<'a, D> Permutation<D>
impl<'a, D> Permutation<D>
Sourcepub fn permute_cols_mut<T, R, S>(
&mut self,
mat: &mut Matrix<T, R, D, S>,
) -> Result<(), Error>
pub fn permute_cols_mut<T, R, S>( &mut self, mat: &mut Matrix<T, R, D, S>, ) -> Result<(), Error>
Apply the column permutation to a matrix A, equivalent to P A.
Sourcepub fn inv_permute_cols_mut<T, R, S>(
&mut self,
mat: &mut Matrix<T, R, D, S>,
) -> Result<(), Error>
pub fn inv_permute_cols_mut<T, R, S>( &mut self, mat: &mut Matrix<T, R, D, S>, ) -> Result<(), Error>
Apply the inverse column permutation to a matrix A, equivalent to P^T A.
Sourcepub fn permute_rows_mut<T, C, S>(
&mut self,
mat: &mut Matrix<T, D, C, S>,
) -> Result<(), Error>
pub fn permute_rows_mut<T, C, S>( &mut self, mat: &mut Matrix<T, D, C, S>, ) -> Result<(), Error>
Apply the row permutation to a matrix A, equivalent to P A.
Trait Implementations§
Source§impl<D> Clone for Permutation<D>
impl<D> Clone for Permutation<D>
Source§fn clone(&self) -> Permutation<D>
fn clone(&self) -> Permutation<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D> Debug for Permutation<D>
impl<D> Debug for Permutation<D>
Source§impl<D> PartialEq for Permutation<D>
impl<D> PartialEq for Permutation<D>
impl<D> Eq for Permutation<D>
impl<D> StructuralPartialEq for Permutation<D>
Auto Trait Implementations§
impl<D> !Freeze for Permutation<D>
impl<D> !RefUnwindSafe for Permutation<D>
impl<D> !Send for Permutation<D>
impl<D> !Sync for Permutation<D>
impl<D> !Unpin for Permutation<D>
impl<D> !UnwindSafe for Permutation<D>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.