pub struct Permutation<const N: usize> { /* private fields */ }Implementations§
Source§impl<const N: usize> Permutation<N>
impl<const N: usize> Permutation<N>
pub fn new(perm: [usize; N]) -> Result<Self, &'static str>
pub fn new_from_cycles(cycles: Vec<Vec<usize>>) -> Result<Self, &'static str>
pub fn call(&self, x: usize) -> Result<usize, &'static str>
pub fn sign(&self) -> C2
pub fn disjoint_cycles(&self) -> Vec<Cycle<N>>
pub fn cycle_shape(&self) -> Vec<usize>
pub fn all_permutations() -> impl Iterator<Item = Self>
pub fn symmetric_composition_table() -> (FiniteGroupMultiplicationTable, Vec<Self>, HashMap<Self, usize>)
pub fn alternating_composition_table() -> (FiniteGroupMultiplicationTable, Vec<Self>, HashMap<Self, usize>)
Trait Implementations§
Source§impl<const N: usize> Clone for Permutation<N>
impl<const N: usize> Clone for Permutation<N>
Source§fn clone(&self) -> Permutation<N>
fn clone(&self) -> Permutation<N>
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<const N: usize> Debug for Permutation<N>
impl<const N: usize> Debug for Permutation<N>
Source§impl<const N: usize> Display for Permutation<N>
impl<const N: usize> Display for Permutation<N>
Source§impl<const N: usize> From<Permutation<N>> for Permutation
impl<const N: usize> From<Permutation<N>> for Permutation
Source§fn from(value: Permutation<N>) -> Self
fn from(value: Permutation<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> Group for Permutation<N>
impl<const N: usize> Group for Permutation<N>
fn identity() -> Self
fn inverse(self) -> Self
fn compose_refs(a: &Self, b: &Self) -> Self
fn compose_mut(&mut self, other: &Self)
fn inverse_ref(&self) -> Self
fn compose(a: Self, b: Self) -> Self
fn compose_lref(a: &Self, b: Self) -> Self
fn compose_rref(a: Self, b: &Self) -> Self
fn compose_list(elems: Vec<impl Borrow<Self>>) -> Self
fn nat_pow(&self, n: &Natural) -> Self
fn int_pow(&self, n: &Integer) -> Self
fn generated_finite_subgroup_table(
generators: Vec<Self>,
) -> (FiniteGroupMultiplicationTable, Vec<Self>, HashMap<Self, usize>)where
Self: Hash,
fn generated_finite_subgroup(gens: Vec<Self>) -> FiniteSubgroup<Self>where
Self: Hash,
Source§impl<const N: usize> Hash for Permutation<N>
impl<const N: usize> Hash for Permutation<N>
Source§impl<const N: usize> PartialEq for Permutation<N>
impl<const N: usize> PartialEq for Permutation<N>
Source§impl<const N: usize> TryFrom<Permutation> for Permutation<N>
impl<const N: usize> TryFrom<Permutation> for Permutation<N>
impl<const N: usize> Eq for Permutation<N>
impl<const N: usize> StructuralPartialEq for Permutation<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Permutation<N>
impl<const N: usize> RefUnwindSafe for Permutation<N>
impl<const N: usize> Send for Permutation<N>
impl<const N: usize> Sync for Permutation<N>
impl<const N: usize> Unpin for Permutation<N>
impl<const N: usize> UnwindSafe for Permutation<N>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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