Trait snarkvm_wasm::FieldGadget[][src]

pub trait FieldGadget<NativeF, F>: Clone + EqGadget<F> + NEqGadget<F> + ConditionalEqGadget<F> + ToBitsBEGadget<F> + ToBitsLEGadget<F> + AllocGadget<NativeF, F> + ToBytesGadget<F> + CondSelectGadget<F> + TwoBitLookupGadget<F, TableConstant = NativeF> + ThreeBitCondNegLookupGadget<F, TableConstant = NativeF> + Debug where
    F: Field,
    NativeF: Field
{ type Variable: Clone + Debug;
Show methods fn get_value(&self) -> Option<NativeF>;
fn get_variable(&self) -> Self::Variable;
fn zero<CS>(CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn one<CS>(CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn conditionally_add_constant<CS>(
        &self,
        CS,
        &Boolean,
        NativeF
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn add<CS>(&self, CS, &Self) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn sub<CS>(&self, CS, &Self) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn negate<CS>(&self, CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn mul<CS>(&self, CS, &Self) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn add_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn mul_by_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn inverse<CS>(&self, CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn frobenius_map<CS>(
        &self,
        CS,
        power: usize
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn cost_of_mul() -> usize;
fn cost_of_inv() -> usize; fn add_in_place<CS>(
        &mut self,
        cs: CS,
        other: &Self
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn double<CS>(&self, cs: CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn double_in_place<CS>(
        &mut self,
        cs: CS
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn sub_in_place<CS>(
        &mut self,
        cs: CS,
        other: &Self
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn negate_in_place<CS>(
        &mut self,
        cs: CS
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn mul_in_place<CS>(
        &mut self,
        cs: CS,
        other: &Self
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn square<CS>(&self, cs: CS) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn square_in_place<CS>(
        &mut self,
        cs: CS
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn mul_equals<CS>(
        &self,
        cs: CS,
        other: &Self,
        result: &Self
    ) -> Result<(), SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn square_equals<CS>(
        &self,
        cs: CS,
        result: &Self
    ) -> Result<(), SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn add_constant_in_place<CS>(
        &mut self,
        cs: CS,
        other: &NativeF
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn sub_constant<CS>(
        &self,
        cs: CS,
        fe: &NativeF
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn sub_constant_in_place<CS>(
        &mut self,
        cs: CS,
        other: &NativeF
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn mul_by_constant_in_place<CS>(
        &mut self,
        cs: CS,
        other: &NativeF
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn frobenius_map_in_place<CS>(
        &mut self,
        cs: CS,
        power: usize
    ) -> Result<&mut Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn pow<CS>(&self, cs: CS, bits: &[Boolean]) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>
, { ... }
fn pow_by_constant<CS, S>(
        &self,
        cs: CS,
        exp: S
    ) -> Result<Self, SynthesisError>
    where
        CS: ConstraintSystem<F>,
        S: AsRef<[u64]>
, { ... }
}

Associated Types

Required methods

fn get_value(&self) -> Option<NativeF>[src]

fn get_variable(&self) -> Self::Variable[src]

fn zero<CS>(CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn one<CS>(CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn conditionally_add_constant<CS>(
    &self,
    CS,
    &Boolean,
    NativeF
) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn add<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn sub<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn negate<CS>(&self, CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn mul<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn add_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn mul_by_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn inverse<CS>(&self, CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn frobenius_map<CS>(&self, CS, power: usize) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn cost_of_mul() -> usize[src]

fn cost_of_inv() -> usize[src]

Provided methods

fn add_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Self
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn double<CS>(&self, cs: CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn double_in_place<CS>(&mut self, cs: CS) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn sub_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Self
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn negate_in_place<CS>(&mut self, cs: CS) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn mul_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Self
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn square<CS>(&self, cs: CS) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn square_in_place<CS>(&mut self, cs: CS) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn mul_equals<CS>(
    &self,
    cs: CS,
    other: &Self,
    result: &Self
) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn square_equals<CS>(&self, cs: CS, result: &Self) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn add_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &NativeF
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn sub_constant<CS>(&self, cs: CS, fe: &NativeF) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn sub_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &NativeF
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn mul_by_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &NativeF
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn frobenius_map_in_place<CS>(
    &mut self,
    cs: CS,
    power: usize
) -> Result<&mut Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn pow<CS>(&self, cs: CS, bits: &[Boolean]) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Accepts as input a list of bits which, when interpreted in big-endian form, are a scalar.

fn pow_by_constant<CS, S>(&self, cs: CS, exp: S) -> Result<Self, SynthesisError> where
    CS: ConstraintSystem<F>,
    S: AsRef<[u64]>, 
[src]

Computes self^S, where S is interpreted as an little-endian u64-decomposition of an integer.

Implementors

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

type Variable = ConstraintVariable<F>

pub fn get_value(&self) -> Option<F>[src]

pub fn get_variable(&self) -> <FpGadget<F> as FieldGadget<F, F>>::Variable[src]

pub fn zero<CS>(_cs: CS) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn one<CS>(_cs: CS) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn conditionally_add_constant<CS>(
    &self,
    _cs: CS,
    bit: &Boolean,
    coeff: F
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add<CS>(
    &self,
    cs: CS,
    other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn double<CS>(&self, _cs: CS) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn double_in_place<CS>(
    &mut self,
    _cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn sub<CS>(
    &self,
    cs: CS,
    other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate<CS>(&self, cs: CS) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate_in_place<CS>(
    &mut self,
    _cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant<CS>(
    &self,
    _cs: CS,
    other: &F
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant_in_place<CS>(
    &mut self,
    _cs: CS,
    other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    other: &F
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_by_constant_in_place<CS>(
    &mut self,
    _cs: CS,
    other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn inverse<CS>(&self, cs: CS) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map<CS>(
    &self,
    _cs: CS,
    _power: usize
) -> Result<FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map_in_place<CS>(
    &mut self,
    _cs: CS,
    _power: usize
) -> Result<&mut FpGadget<F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_equals<CS>(
    &self,
    cs: CS,
    other: &FpGadget<F>,
    result: &FpGadget<F>
) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn square_equals<CS>(
    &self,
    cs: CS,
    result: &FpGadget<F>
) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn cost_of_mul() -> usize[src]

pub fn cost_of_inv() -> usize[src]

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

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

pub fn square<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Use the Toom-Cook-3x method to compute multiplication.

type Variable = ((ConstraintVariable<F>, ConstraintVariable<F>), (ConstraintVariable<F>, ConstraintVariable<F>), (ConstraintVariable<F>, ConstraintVariable<F>))

pub fn get_value(&self) -> Option<Fp6<P>>[src]

pub fn get_variable(
    &self
) -> <Fp6Gadget<P, F> as FieldGadget<Fp6<P>, F>>::Variable
[src]

pub fn zero<CS>(cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn one<CS>(cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn conditionally_add_constant<CS>(
    &self,
    cs: CS,
    bit: &Boolean,
    coeff: Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add<CS>(
    &self,
    cs: CS,
    other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn sub<CS>(
    &self,
    cs: CS,
    other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate_in_place<CS>(
    &mut self,
    cs: CS
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn inverse<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant<CS>(
    &self,
    cs: CS,
    other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Fp6<P>
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map<CS>(
    &self,
    cs: CS,
    power: usize
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map_in_place<CS>(
    &mut self,
    cs: CS,
    power: usize
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn cost_of_mul() -> usize[src]

pub fn cost_of_inv() -> usize[src]

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

type Variable = (ConstraintVariable<F>, ConstraintVariable<F>)

pub fn get_value(&self) -> Option<Fp2<P>>[src]

pub fn get_variable(
    &self
) -> <Fp2Gadget<P, F> as FieldGadget<Fp2<P>, F>>::Variable
[src]

pub fn zero<CS>(cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn one<CS>(cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn conditionally_add_constant<CS>(
    &self,
    cs: CS,
    bit: &Boolean,
    coeff: Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add<CS>(
    &self,
    cs: CS,
    other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn sub<CS>(
    &self,
    cs: CS,
    other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn double<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn double_in_place<CS>(
    &mut self,
    cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate_in_place<CS>(
    &mut self,
    cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn square<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn square_in_place<CS>(
    &mut self,
    cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn inverse<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_equals<CS>(
    &self,
    cs: CS,
    other: &Fp2Gadget<P, F>,
    result: &Fp2Gadget<P, F>
) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map<CS>(
    &self,
    cs: CS,
    power: usize
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map_in_place<CS>(
    &mut self,
    cs: CS,
    power: usize
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant<CS>(
    &self,
    cs: CS,
    other: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Fp2<P>
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    fe: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn cost_of_mul() -> usize[src]

pub fn cost_of_inv() -> usize[src]

impl<P, F> FieldGadget<Fp12<P>, 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 Variable = (<Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F> as FieldGadget<Fp6<<P as Fp12Parameters>::Fp6Params>, F>>::Variable, <Fp6Gadget<<P as Fp12Parameters>::Fp6Params, F> as FieldGadget<Fp6<<P as Fp12Parameters>::Fp6Params>, F>>::Variable)

pub fn get_value(&self) -> Option<Fp12<P>>[src]

pub fn get_variable(
    &self
) -> <Fp12Gadget<P, F> as FieldGadget<Fp12<P>, F>>::Variable
[src]

pub fn zero<CS>(cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn one<CS>(cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn conditionally_add_constant<CS>(
    &self,
    cs: CS,
    bit: &Boolean,
    coeff: Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add<CS>(
    &self,
    cs: CS,
    other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Fp12Gadget<P, F>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn sub<CS>(
    &self,
    cs: CS,
    other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn sub_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Fp12Gadget<P, F>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn negate_in_place<CS>(
    &mut self,
    cs: CS
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn square<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant<CS>(
    &self,
    cs: CS,
    other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn add_constant_in_place<CS>(
    &mut self,
    cs: CS,
    other: &Fp12<P>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map<CS>(
    &self,
    cs: CS,
    power: usize
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn frobenius_map_in_place<CS>(
    &mut self,
    cs: CS,
    power: usize
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn inverse<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_equals<CS>(
    &self,
    cs: CS,
    other: &Fp12Gadget<P, F>,
    result: &Fp12Gadget<P, F>
) -> Result<(), SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn cost_of_mul() -> usize[src]

pub fn cost_of_inv() -> usize[src]

impl<TargetField, BaseField> FieldGadget<TargetField, BaseField> for NonNativeFieldVar<TargetField, BaseField> where
    BaseField: PrimeField,
    TargetField: PrimeField
[src]

type Variable = AllocatedNonNativeFieldVar<TargetField, BaseField>

pub fn get_value(&self) -> Option<TargetField>[src]

pub fn get_variable(
    &self
) -> <NonNativeFieldVar<TargetField, BaseField> as FieldGadget<TargetField, BaseField>>::Variable
[src]

pub fn zero<CS>(
    CS
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn one<CS>(
    CS
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn negate<CS>(
    &self,
    cs: CS
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn conditionally_add_constant<CS>(
    &self,
    _cs: CS,
    _bit: &Boolean,
    _coeff: TargetField
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn add<CS>(
    &self,
    cs: CS,
    other: &NonNativeFieldVar<TargetField, BaseField>
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn add_constant<CS>(
    &self,
    cs: CS,
    other: &TargetField
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn sub<CS>(
    &self,
    cs: CS,
    other: &NonNativeFieldVar<TargetField, BaseField>
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &NonNativeFieldVar<TargetField, BaseField>
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn mul_by_constant<CS>(
    &self,
    cs: CS,
    other: &TargetField
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn inverse<CS>(
    &self,
    cs: CS
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn frobenius_map<CS>(
    &self,
    CS,
    power: usize
) -> Result<NonNativeFieldVar<TargetField, BaseField>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn cost_of_mul() -> usize[src]

pub fn cost_of_inv() -> usize[src]