Trait snarkvm_wasm::ThreeBitCondNegLookupGadget [−][src]
pub trait ThreeBitCondNegLookupGadget<F> where
F: Field, { type TableConstant; fn three_bit_cond_neg_lookup<CS>(
cs: CS,
bits: &[Boolean],
b0b1: &Boolean,
constants: &[Self::TableConstant]
) -> Result<Self, SynthesisError>
where
CS: ConstraintSystem<F>; fn cost() -> usize; }
Expand description
Uses three bits to perform a lookup into a table, where the last bit performs negation
Associated Types
type TableConstant[src]Required methods
fn three_bit_cond_neg_lookup<CS>(
cs: CS,
bits: &[Boolean],
b0b1: &Boolean,
constants: &[Self::TableConstant]
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]Implementors
type TableConstant = Fpub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
b: &[Boolean],
b0b1: &Boolean,
c: &[<FpGadget<F> as ThreeBitCondNegLookupGadget<F>>::TableConstant]
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]type TableConstant = Fpub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
b: &[Boolean],
b0b1: &Boolean,
c: &[<AllocatedFp<F> as ThreeBitCondNegLookupGadget<F>>::TableConstant]
) -> Result<AllocatedFp<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P, F> ThreeBitCondNegLookupGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField, [src]
impl<P, F> ThreeBitCondNegLookupGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField, [src]type TableConstant = Fp2<P>pub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
b: &[Boolean],
b0b1: &Boolean,
c: &[<Fp2Gadget<P, F> as ThreeBitCondNegLookupGadget<F>>::TableConstant]
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P, F> ThreeBitCondNegLookupGadget<F> for Fp6Gadget<P, F> where
P: Fp6Parameters,
F: PrimeField,
<P as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, [src]
impl<P, F> ThreeBitCondNegLookupGadget<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>pub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
b: &[Boolean],
b0b1: &Boolean,
c: &[<Fp6Gadget<P, F> as ThreeBitCondNegLookupGadget<F>>::TableConstant]
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<P, F> ThreeBitCondNegLookupGadget<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]
impl<P, F> ThreeBitCondNegLookupGadget<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>pub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
b: &[Boolean],
b0b1: &Boolean,
c: &[<Fp12Gadget<P, F> as ThreeBitCondNegLookupGadget<F>>::TableConstant]
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]impl<TargetField, BaseField> ThreeBitCondNegLookupGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]
impl<TargetField, BaseField> ThreeBitCondNegLookupGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]type TableConstant = TargetFieldpub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
bits: &[Boolean],
b0b1: &Boolean,
constants: &[<NonNativeFieldVar<TargetField, BaseField> as ThreeBitCondNegLookupGadget<BaseField>>::TableConstant]
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
CS: ConstraintSystem<BaseField>, [src]impl<TargetField, BaseField> ThreeBitCondNegLookupGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]
impl<TargetField, BaseField> ThreeBitCondNegLookupGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField> where
BaseField: PrimeField,
TargetField: PrimeField, [src]type TableConstant = TargetFieldpub fn three_bit_cond_neg_lookup<CS>(
cs: CS,
bits: &[Boolean],
b0b1: &Boolean,
constants: &[<AllocatedNonNativeFieldVar<TargetField, BaseField> as ThreeBitCondNegLookupGadget<BaseField>>::TableConstant]
) -> Result<AllocatedNonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
CS: ConstraintSystem<BaseField>, [src]