pub type PermD = Perm<Dynamic>;Expand description
Permutation type with runtime size.
Aliased Type§
pub struct PermD { /* private fields */ }Implementations§
Source§impl PermD
impl PermD
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 PermFromIndices<&[usize]> for PermD
impl PermFromIndices<&[usize]> for PermD
Source§fn from_indices(indices: &[usize]) -> Option<Self>
fn from_indices(indices: &[usize]) -> Option<Self>
Builds a dynamic permutation from a slice of indices.
Source§impl<T> PermFromSorting<&[T], T> for PermD
impl<T> PermFromSorting<&[T], T> for PermD
type Output = Perm<Dynamic>
Source§fn from_sort(vec: &[T]) -> Self::Outputwhere
T: Ord,
fn from_sort(vec: &[T]) -> Self::Outputwhere
T: Ord,
Builds a permutation by sorting a slice-like type.
Source§fn from_sort_by<F>(vec: &[T], compare: F) -> Self::Output
fn from_sort_by<F>(vec: &[T], compare: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a comparing function.
Source§fn from_sort_by_key<B, F>(vec: &[T], f: F) -> Self::Output
fn from_sort_by_key<B, F>(vec: &[T], f: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a key function.
Source§impl<T, const SIZE: usize> PermFromSorting<&[T; SIZE], T> for PermD
impl<T, const SIZE: usize> PermFromSorting<&[T; SIZE], T> for PermD
type Output = Perm<Dynamic>
Source§fn from_sort(vec: &[T; SIZE]) -> Self::Outputwhere
T: Ord,
fn from_sort(vec: &[T; SIZE]) -> Self::Outputwhere
T: Ord,
Builds a permutation by sorting a slice-like type.
Source§fn from_sort_by<F>(vec: &[T; SIZE], compare: F) -> Self::Output
fn from_sort_by<F>(vec: &[T; SIZE], compare: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a comparing function.
Source§fn from_sort_by_key<B, F>(vec: &[T; SIZE], f: F) -> Self::Output
fn from_sort_by_key<B, F>(vec: &[T; SIZE], f: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a key function.
Source§impl<T, const SIZE: usize> PermFromSorting<[T; SIZE], T> for PermD
impl<T, const SIZE: usize> PermFromSorting<[T; SIZE], T> for PermD
type Output = Perm<Dynamic>
Source§fn from_sort(vec: [T; SIZE]) -> Self::Outputwhere
T: Ord,
fn from_sort(vec: [T; SIZE]) -> Self::Outputwhere
T: Ord,
Builds a permutation by sorting a slice-like type.
Source§fn from_sort_by<F>(vec: [T; SIZE], compare: F) -> Self::Output
fn from_sort_by<F>(vec: [T; SIZE], compare: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a comparing function.
Source§fn from_sort_by_key<B, F>(vec: [T; SIZE], f: F) -> Self::Output
fn from_sort_by_key<B, F>(vec: [T; SIZE], f: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a key function.
Source§impl<T> PermFromSorting<Vec<T>, T> for PermD
impl<T> PermFromSorting<Vec<T>, T> for PermD
type Output = Perm<Dynamic>
Source§fn from_sort(vec: Vec<T>) -> Self::Outputwhere
T: Ord,
fn from_sort(vec: Vec<T>) -> Self::Outputwhere
T: Ord,
Builds a permutation by sorting a slice-like type.
Source§fn from_sort_by<F>(vec: Vec<T>, compare: F) -> Self::Output
fn from_sort_by<F>(vec: Vec<T>, compare: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a comparing function.
Source§fn from_sort_by_key<B, F>(vec: Vec<T>, f: F) -> Self::Output
fn from_sort_by_key<B, F>(vec: Vec<T>, f: F) -> Self::Output
Builds a permutation by sorting a slice-like type with a key function.