Struct sprs::Permutation
source · pub struct Permutation<I, IndStorage>where
IndStorage: Deref<Target = [I]>,{ /* private fields */ }
Implementations§
source§impl<'a, I: SpIndex> Permutation<I, &'a [I]>
impl<'a, I: SpIndex> Permutation<I, &'a [I]>
pub fn reborrow(&self) -> Self
pub fn reborrow_inv(&self) -> Self
source§impl<I: SpIndex, IndStorage> Permutation<I, IndStorage>where
IndStorage: Deref<Target = [I]>,
impl<I: SpIndex, IndStorage> Permutation<I, IndStorage>where IndStorage: Deref<Target = [I]>,
pub fn identity(dim: usize) -> Self
pub fn inv(&self) -> PermViewI<'_, I>
pub fn dim(&self) -> usize
sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Check whether the permutation is the identity.
pub fn view(&self) -> PermViewI<'_, I>
pub fn owned_clone(&self) -> PermOwnedI<I>
pub fn at(&self, index: usize) -> usize
pub fn at_inv(&self, index: usize) -> usize
pub fn to_other_idx_type<I2>(&self) -> PermOwnedI<I2>where I2: SpIndex,
Trait Implementations§
source§impl<I: Clone, IndStorage> Clone for Permutation<I, IndStorage>where
IndStorage: Deref<Target = [I]> + Clone,
impl<I: Clone, IndStorage> Clone for Permutation<I, IndStorage>where IndStorage: Deref<Target = [I]> + Clone,
source§fn clone(&self) -> Permutation<I, IndStorage>
fn clone(&self) -> Permutation<I, IndStorage>
Returns a copy 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<I: Debug, IndStorage> Debug for Permutation<I, IndStorage>where
IndStorage: Deref<Target = [I]> + Debug,
impl<I: Debug, IndStorage> Debug for Permutation<I, IndStorage>where IndStorage: Deref<Target = [I]> + Debug,
source§impl<'b, V, I, IndStorage> Mul<V> for &'b Permutation<I, IndStorage>where
IndStorage: 'b + Deref<Target = [I]>,
V: DenseVector,
<V as DenseVector>::Owned: DenseVectorMut + DenseVector<Scalar = <V as DenseVector>::Scalar>,
<V as DenseVector>::Scalar: Clone,
I: SpIndex,
impl<'b, V, I, IndStorage> Mul<V> for &'b Permutation<I, IndStorage>where IndStorage: 'b + Deref<Target = [I]>, V: DenseVector, <V as DenseVector>::Owned: DenseVectorMut + DenseVector<Scalar = <V as DenseVector>::Scalar>, <V as DenseVector>::Scalar: Clone, I: SpIndex,
source§impl<V, I, IndStorage> Mul<V> for Permutation<I, IndStorage>where
IndStorage: Deref<Target = [I]>,
V: DenseVector,
<V as DenseVector>::Owned: DenseVectorMut + DenseVector<Scalar = <V as DenseVector>::Scalar>,
<V as DenseVector>::Scalar: Clone,
I: SpIndex,
impl<V, I, IndStorage> Mul<V> for Permutation<I, IndStorage>where IndStorage: Deref<Target = [I]>, V: DenseVector, <V as DenseVector>::Owned: DenseVectorMut + DenseVector<Scalar = <V as DenseVector>::Scalar>, <V as DenseVector>::Scalar: Clone, I: SpIndex,
Auto Trait Implementations§
impl<I, IndStorage> RefUnwindSafe for Permutation<I, IndStorage>where IndStorage: RefUnwindSafe,
impl<I, IndStorage> Send for Permutation<I, IndStorage>where IndStorage: Send,
impl<I, IndStorage> Sync for Permutation<I, IndStorage>where IndStorage: Sync,
impl<I, IndStorage> Unpin for Permutation<I, IndStorage>where IndStorage: Unpin,
impl<I, IndStorage> UnwindSafe for Permutation<I, IndStorage>where IndStorage: UnwindSafe,
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
§impl<T> Pointable for T
impl<T> Pointable for T
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§unsafe fn to_subset_unchecked(&self) -> SS
unsafe 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.