Trait qsym2::permutation::PermutableCollection
source · pub trait PermutableCollection{
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§
Required Methods§
sourcefn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>
fn get_perm_of(&self, other: &Self) -> Option<Permutation<Self::Rank>>
Determines the permutation, if any, that maps self
to other
.
sourcefn permute(&self, perm: &Permutation<Self::Rank>) -> Result<Self, Error>
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.
sourcefn permute_mut(&mut self, perm: &Permutation<Self::Rank>) -> Result<(), Error>
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.