Type Definition rusty_perm::PermS[][src]

type PermS<const SIZE: usize> = Perm<Static<{ SIZE }>>;

Permutation type with static size known in compile time.

Implementations

impl<const SIZE: usize> PermS<SIZE>[src]

pub fn identity() -> Self[src]

pub fn swap(first: usize, second: usize) -> Option<Self>[src]

pub fn cycle() -> Self[src]

pub fn reverse_cycle() -> Self[src]

pub fn permute_indices(&self, perm: &PermS<SIZE>) -> Self[src]

pub fn conjugate_with(&self, other: &PermS<SIZE>) -> Self[src]

pub fn to_size<const NEW_SIZE: usize>(&self) -> Option<PermS<NEW_SIZE>>[src]

impl<const SIZE: usize> PermS<SIZE>[src]

pub fn into_dynamic(self) -> PermD[src]

Trait Implementations

impl<const SIZE: usize> Mul<&'_ Perm<Dynamic>> for &PermS<SIZE>[src]

type Output = PermS<SIZE>

The resulting type after applying the * operator.

impl<const SIZE: usize> Mul<&'_ Perm<Static<SIZE>>> for &PermS<SIZE>[src]

type Output = PermS<SIZE>

The resulting type after applying the * operator.

impl<T, const SIZE: usize> PermApply<[T; SIZE]> for PermS<SIZE>[src]

type Output = ()

impl<T, const SIZE: usize> PermApply<[T]> for PermS<SIZE>[src]

type Output = Result<(), &'static str>

impl<T, const SIZE: usize> PermApply<Vec<T, Global>> for PermS<SIZE>[src]

type Output = Result<(), &'static str>

impl<const SIZE: usize> PermFromIndices<&'_ [usize; SIZE]> for PermS<SIZE>[src]

fn from_indices(indices: &[usize; SIZE]) -> Option<Self>[src]

Builds a static permutation from a borrowed array of indices.

impl<const SIZE: usize> PermFromIndices<&'_ [usize]> for PermS<SIZE>[src]

fn from_indices(indices: &[usize]) -> Option<Self>[src]

Builds a static permutation from a slice of indices.

impl<const SIZE: usize> PermFromIndices<[usize; SIZE]> for PermS<SIZE>[src]

fn from_indices(indices: [usize; SIZE]) -> Option<Self>[src]

Builds a static permutation from an owned array of indices.

impl<const SIZE: usize> PermFromIndices<Cow<'_, [usize]>> for PermS<SIZE>[src]

fn from_indices(indices: Cow<'_, [usize]>) -> Option<Self>[src]

Builds a static permutation from a copy-on-write slice of indices.

impl<const SIZE: usize> PermFromIndices<Vec<usize, Global>> for PermS<SIZE>[src]

fn from_indices(indices: Vec<usize>) -> Option<Self>[src]

Builds a static permutation from a vector indices.

impl<T, const SIZE: usize> PermFromSorting<&'_ [T; SIZE], T> for PermS<SIZE>[src]

type Output = Self

impl<T, const SIZE: usize> PermFromSorting<&'_ [T], T> for PermS<SIZE>[src]

type Output = Option<Self>

impl<T, const SIZE: usize> PermFromSorting<[T; SIZE], T> for PermS<SIZE>[src]

type Output = Self

impl<T, const SIZE: usize> PermFromSorting<Vec<T, Global>, T> for PermS<SIZE>[src]

type Output = Option<Self>

impl<const SIZE: usize> PermProduct<Perm<Dynamic>> for PermS<SIZE>[src]

type Output = Option<PermS<SIZE>>

impl<const SIZE: usize> PermProduct<Perm<Static<SIZE>>> for PermS<SIZE>[src]

type Output = PermS<SIZE>

impl<const SIZE: usize> Permutation for PermS<SIZE>[src]

impl<'a, const SIZE: usize> Product<&'a Perm<Static<SIZE>>> for PermS<SIZE>[src]

impl<const SIZE: usize> Product<Perm<Static<SIZE>>> for PermS<SIZE>[src]