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.
fn mul(self, other: &PermD) -> Self::Output
[src]
impl<const SIZE: usize> Mul<&'_ Perm<Static<SIZE>>> for &PermS<SIZE>
[src]
type Output = PermS<SIZE>
The resulting type after applying the *
operator.
fn mul(self, other: &PermS<SIZE>) -> Self::Output
[src]
impl<T, const SIZE: usize> PermApply<[T; SIZE]> for PermS<SIZE>
[src]
impl<T, const SIZE: usize> PermApply<[T]> for PermS<SIZE>
[src]
impl<T, const SIZE: usize> PermApply<Vec<T, Global>> for PermS<SIZE>
[src]
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
fn from_sort(vec: &[T; SIZE]) -> Self::Output where
T: Ord,
[src]
T: Ord,
fn from_sort_by<F>(vec: &[T; SIZE], compare: F) -> Self::Output where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn from_sort_by_key<B, F>(vec: &[T; SIZE], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn from_sort_by_cached_key<B, F>(vec: &[T; SIZE], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
impl<T, const SIZE: usize> PermFromSorting<&'_ [T], T> for PermS<SIZE>
[src]
type Output = Option<Self>
fn from_sort(vec: &[T]) -> Self::Output where
T: Ord,
[src]
T: Ord,
fn from_sort_by<F>(vec: &[T], compare: F) -> Self::Output where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn from_sort_by_key<B, F>(vec: &[T], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn from_sort_by_cached_key<B, F>(vec: &[T], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
impl<T, const SIZE: usize> PermFromSorting<[T; SIZE], T> for PermS<SIZE>
[src]
type Output = Self
fn from_sort(vec: [T; SIZE]) -> Self::Output where
T: Ord,
[src]
T: Ord,
fn from_sort_by<F>(vec: [T; SIZE], compare: F) -> Self::Output where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn from_sort_by_key<B, F>(vec: [T; SIZE], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn from_sort_by_cached_key<B, F>(vec: [T; SIZE], f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
impl<T, const SIZE: usize> PermFromSorting<Vec<T, Global>, T> for PermS<SIZE>
[src]
type Output = Option<Self>
fn from_sort(vec: Vec<T>) -> Self::Output where
T: Ord,
[src]
T: Ord,
fn from_sort_by<F>(vec: Vec<T>, compare: F) -> Self::Output where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn from_sort_by_key<B, F>(vec: Vec<T>, f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn from_sort_by_cached_key<B, F>(vec: Vec<T>, f: F) -> Self::Output where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,