Trait snarkvm_wasm::traits::utilities::select::TwoBitLookupGadget[][src]

pub trait TwoBitLookupGadget<F> where
    F: Field
{ type TableConstant; pub fn two_bit_lookup<CS>(
        cs: CS,
        bits: &[Boolean],
        constants: &[Self::TableConstant]
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
pub fn cost() -> usize; }

Uses two bits to perform a lookup into a table

Associated Types

Loading content...

Required methods

pub fn two_bit_lookup<CS>(
    cs: CS,
    bits: &[Boolean],
    constants: &[Self::TableConstant]
) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn cost() -> usize[src]

Loading content...

Implementors

impl<F> TwoBitLookupGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

Uses two bits to perform a lookup into a table b is little-endian: b[0] is LSB.

type TableConstant = F

impl<F> TwoBitLookupGadget<F> for AllocatedFp<F> where
    F: PrimeField
[src]

Uses two bits to perform a lookup into a table b is little-endian: b[0] is LSB.

type TableConstant = F

impl<P, F> TwoBitLookupGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

type TableConstant = Fp2<P>

impl<P, F> TwoBitLookupGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

type TableConstant = Fp6<P>

impl<P, F> TwoBitLookupGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

type TableConstant = Fp12<P>

Loading content...