Skip to main content

Permutation

Trait Permutation 

Source
pub trait Permutation {
    // Required methods
    fn len(&self) -> usize;
    fn inverse(&self) -> Self;
    fn indices(&self) -> &[usize];
    fn pow(&self, exp: u32) -> Self;
}
Expand description

An abstract representation of permutation data structure.

Required Methods§

Source

fn len(&self) -> usize

Gets the size of permutation.

Source

fn inverse(&self) -> Self

Builds the inverse of permutation.

Source

fn indices(&self) -> &[usize]

Gets the reference to the internal permuted indices.

Source

fn pow(&self, exp: u32) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Permutation for PermD

Source§

impl<const SIZE: usize> Permutation for PermS<SIZE>