pub struct Perm<S>where
S: PermSize,{ /* private fields */ }
Expand description
Generic permutation data structure.
Implementations§
Source§impl<const SIZE: usize> Perm<Static<SIZE>>
impl<const SIZE: usize> Perm<Static<SIZE>>
pub fn identity() -> Self
pub fn swap(first: usize, second: usize) -> Option<Self>
pub fn cycle() -> Self
pub fn reverse_cycle() -> Self
pub fn permute_indices(&self, perm: &PermS<SIZE>) -> Self
pub fn conjugate_with(&self, other: &PermS<SIZE>) -> Self
pub fn to_size<const NEW_SIZE: usize>(&self) -> Option<PermS<NEW_SIZE>>
Source§impl Perm<Dynamic>
impl Perm<Dynamic>
pub fn empty() -> Self
pub fn unit() -> Self
pub fn swap(size: usize, first: usize, second: usize) -> Option<Self>
pub fn identity(size: usize) -> Self
pub fn cycle(size: usize) -> Self
pub fn reverse_cycle(size: usize) -> Self
pub fn permute_indices(&self, perm: &PermD) -> Option<Self>
pub fn conjugate_with(&self, other: &PermD) -> Option<Self>
pub fn to_size(&self, new_size: usize) -> Option<PermD>
pub fn into_static<const SIZE: usize>(self) -> Option<PermS<SIZE>>
Trait Implementations§
Source§impl<const SIZE: usize> Distribution<Perm<Static<SIZE>>> for Standard
impl<const SIZE: usize> Distribution<Perm<Static<SIZE>>> for Standard
impl<S> Eq for Perm<S>
Auto Trait Implementations§
impl<S> Freeze for Perm<S>
impl<S> RefUnwindSafe for Perm<S>
impl<S> Send for Perm<S>
impl<S> Sync for Perm<S>
impl<S> Unpin for Perm<S>
impl<S> UnwindSafe for Perm<S>
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