Trait qsym2::permutation::PermutableCollection

source ·
pub trait PermutableCollection
where Self: Sized, Self::Rank: PermutationRank,
{ type Rank; // Required methods fn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>; fn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>; fn permute_mut( &mut self, perm: &Permutation<Self::Rank>, ) -> Result<(), Error>; }
Expand description

Trait defining a permutable collection consisting of discrete and distinguishable items that can be permuted.

Required Associated Types§

source

type Rank

The type of the rank of the permutation.

Required Methods§

source

fn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>

Determines the permutation, if any, that maps self to other.

source

fn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>

Permutes the items in the current collection by perm and returns a new collection with the permuted items.

source

fn permute_mut(&mut self, perm: &Permutation<Self::Rank>) -> Result<(), Error>

Permutes in-place the items in the current collection by perm.

Object Safety§

This trait is not object safe.

Implementors§