Trait prio::pcp::Gadget[][src]

pub trait Gadget<F: FieldElement> {
    fn call(&mut self, inp: &[F]) -> Result<F, PcpError>;
fn call_poly(
        &mut self,
        outp: &mut [F],
        inp: &[Vec<F>]
    ) -> Result<(), PcpError>;
fn arity(&self) -> usize;
fn degree(&self) -> usize;
fn as_any(&mut self) -> &mut dyn Any; }
Expand description

A gadget, a non-affine arithmetic circuit that is called when evaluating a validity circuit.

Required methods

Evaluates the gadget on input inp and returns the output.

Evaluate the gadget on input of a sequence of polynomials. The output is written to outp.

Returns the arity of the gadget. This is the length of inp passed to call or call_poly.

Returns the circuit’s arithmetic degree. This determines the minimum length the outp buffer passed to call_poly.

This call is used to downcast a Box<dyn Gadget<F>> to a concrete type.

Implementors