pub struct PermutationRef<'n, 'a, I, E: Entity>(/* private fields */);
Expand description
Permutation of length equal to the value tied to 'n
.
Implementations§
Source§impl<'n, 'a, I: Index, E: Entity> PermutationRef<'n, 'a, I, E>
impl<'n, 'a, I: Index, E: Entity> PermutationRef<'n, 'a, I, E>
Sourcepub fn new(perm: PermutationRef<'a, I, E>, size: Size<'n>) -> Self
pub fn new(perm: PermutationRef<'a, I, E>, size: Size<'n>) -> Self
Returns a new permutation after checking that it matches the size tied to 'n
.
Sourcepub fn inverse(self) -> PermutationRef<'n, 'a, I, E>
pub fn inverse(self) -> PermutationRef<'n, 'a, I, E>
Returns the inverse permutation.
Sourcepub fn into_arrays(
self,
) -> (&'a Array<'n, Idx<'n, I>>, &'a Array<'n, Idx<'n, I>>)
pub fn into_arrays( self, ) -> (&'a Array<'n, Idx<'n, I>>, &'a Array<'n, Idx<'n, I>>)
Returns the forward and inverse permutation indices.
Sourcepub fn into_inner(self) -> PermutationRef<'a, I, E>
pub fn into_inner(self) -> PermutationRef<'a, I, E>
Returns the unconstrained permutation.
Sourcepub fn cast<T: Entity>(self) -> PermutationRef<'n, 'a, I, T>
pub fn cast<T: Entity>(self) -> PermutationRef<'n, 'a, I, T>
Casts the permutation to one with a different type.
Trait Implementations§
Source§impl<I, E: Entity> Clone for PermutationRef<'_, '_, I, E>
impl<I, E: Entity> Clone for PermutationRef<'_, '_, I, E>
impl<I, E: Entity> Copy for PermutationRef<'_, '_, I, E>
Auto Trait Implementations§
impl<'n, 'a, I, E> Freeze for PermutationRef<'n, 'a, I, E>
impl<'n, 'a, I, E> RefUnwindSafe for PermutationRef<'n, 'a, I, E>where
E: RefUnwindSafe,
I: RefUnwindSafe,
impl<'n, 'a, I, E> Send for PermutationRef<'n, 'a, I, E>where
I: Sync,
impl<'n, 'a, I, E> Sync for PermutationRef<'n, 'a, I, E>where
I: Sync,
impl<'n, 'a, I, E> Unpin for PermutationRef<'n, 'a, I, E>where
E: Unpin,
impl<'n, 'a, I, E> UnwindSafe for PermutationRef<'n, 'a, I, E>where
E: UnwindSafe,
I: RefUnwindSafe,
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<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