[][src]Trait r1cs::Permutation

pub trait Permutation<F: Field> {
    fn permute(
        &self,
        builder: &mut GadgetBuilder<F>,
        x: &Expression<F>
    ) -> Expression<F>;
fn inverse(
        &self,
        builder: &mut GadgetBuilder<F>,
        x: &Expression<F>
    ) -> Expression<F>; fn permute_evaluate(&self, x: &Element<F>) -> Element<F> { ... }
fn inverse_evaluate(&self, x: &Element<F>) -> Element<F> { ... } }

A permutation of single field elements.

Required methods

fn permute(
    &self,
    builder: &mut GadgetBuilder<F>,
    x: &Expression<F>
) -> Expression<F>

Permute the given field element.

fn inverse(
    &self,
    builder: &mut GadgetBuilder<F>,
    x: &Expression<F>
) -> Expression<F>

Apply the inverse of this permutation to the given field element.

Loading content...

Provided methods

fn permute_evaluate(&self, x: &Element<F>) -> Element<F>

Like permute, but actually evaluates the permutation rather than just adding it to a GadgetBuilder.

fn inverse_evaluate(&self, x: &Element<F>) -> Element<F>

Like inverse, but actually evaluates the inverse permutation rather than just adding it to a GadgetBuilder.

Loading content...

Implementors

impl<F: Field> Permutation<F> for InversePermutation[src]

impl<F: Field> Permutation<F> for MiMCPermutation<F>[src]

impl<F: Field> Permutation<F> for MonomialPermutation<F>[src]

Loading content...