Permutation

Trait Permutation 

pub trait Permutation<T>: Clone + Sync
where T: Clone,
{ // Provided methods fn permute(&self, input: T) -> T { ... } fn permute_mut(&self, input: &mut T) { ... } }
Expand description

A permutation in the mathematical sense.

Provided Methods§

fn permute(&self, input: T) -> T

fn permute_mut(&self, input: &mut T)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<F, A, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Permutation<[A; WIDTH]> for Poseidon2<F, ExternalPerm, InternalPerm, WIDTH, D>
where F: PrimeField + InjectiveMonomial<D>, A: Algebra<F> + Sync + InjectiveMonomial<D>, ExternalPerm: ExternalLayer<A, WIDTH, D>, InternalPerm: InternalLayer<A, WIDTH, D>,

§

fn permute_mut(&self, state: &mut [A; WIDTH])

§

impl<F, A, const N: usize> Permutation<[A; N]> for CosetMds<F, N>
where F: TwoAdicField, A: Algebra<F>,

§

fn permute_mut(&self, values: &mut [A; N])

§

impl<F, A, const N: usize> Permutation<[A; N]> for IntegratedCosetMds<F, N>
where F: Field, A: Algebra<F>,

§

fn permute_mut(&self, values: &mut [A; N])

§

impl<FP, MU> Permutation<[MontyField31<FP>; 8]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

§

fn permute(&self, input: [MontyField31<FP>; 8]) -> [MontyField31<FP>; 8]

§

impl<FP, MU> Permutation<[MontyField31<FP>; 12]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

§

fn permute(&self, input: [MontyField31<FP>; 12]) -> [MontyField31<FP>; 12]

§

impl<FP, MU> Permutation<[MontyField31<FP>; 16]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

§

fn permute(&self, input: [MontyField31<FP>; 16]) -> [MontyField31<FP>; 16]

§

impl<FP, MU> Permutation<[MontyField31<FP>; 24]> for MdsMatrixMontyField31<MU>
where MU: MDSUtils, FP: BarrettParameters,

§

fn permute(&self, input: [MontyField31<FP>; 24]) -> [MontyField31<FP>; 24]

§

impl<FP, MU> Permutation<[MontyField31<FP>; 32]> for MdsMatrixMontyField31<MU>
where FP: BarrettParameters, MU: MDSUtils,

§

fn permute(&self, input: [MontyField31<FP>; 32]) -> [MontyField31<FP>; 32]

§

impl<FP, MU> Permutation<[MontyField31<FP>; 64]> for MdsMatrixMontyField31<MU>
where FP: BarrettParameters, MU: MDSUtils,

§

fn permute(&self, input: [MontyField31<FP>; 64]) -> [MontyField31<FP>; 64]

§

impl<R> Permutation<[R; 4]> for HLMDSMat4
where R: PrimeCharacteristicRing,

§

fn permute_mut(&self, input: &mut [R; 4])

§

impl<R> Permutation<[R; 4]> for MDSMat4
where R: PrimeCharacteristicRing,

§

fn permute_mut(&self, input: &mut [R; 4])

Implementors§