Trait snarkvm_wasm::traits::fields::FieldGadget [−][src]
Associated Types
Loading content...Required methods
pub fn get_value(&self) -> Option<NativeF>[src]
pub fn get_variable(&self) -> Self::Variable[src]
pub fn zero<CS>(CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn one<CS>(CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn conditionally_add_constant<CS>(
&self,
CS,
&Boolean,
NativeF
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
CS,
&Boolean,
NativeF
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn sub<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn negate<CS>(&self, CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn mul<CS>(&self, CS, &Self) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn add_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn mul_by_constant<CS>(&self, CS, &NativeF) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn inverse<CS>(&self, CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn frobenius_map<CS>(
&self,
CS,
power: usize
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
CS,
power: usize
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn cost_of_mul() -> usize[src]
pub fn cost_of_inv() -> usize[src]
Provided methods
pub fn add_in_place<CS>(
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn double<CS>(&self, cs: CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn double_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub_in_place<CS>(
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn negate_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_in_place<CS>(
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &Self
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn square<CS>(&self, cs: CS) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn square_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_equals<CS>(
&self,
cs: CS,
other: &Self,
result: &Self
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Self,
result: &Self
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn square_equals<CS>(
&self,
cs: CS,
result: &Self
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
result: &Self
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add_constant_in_place<CS>(
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub_constant<CS>(
&self,
cs: CS,
fe: &NativeF
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
fe: &NativeF
) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub_constant_in_place<CS>(
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant_in_place<CS>(
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
other: &NativeF
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map_in_place<CS>(
&mut self,
cs: CS,
power: usize
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
power: usize
) -> Result<&mut Self, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn pow<CS>(&self, cs: CS, bits: &[Boolean]) -> Result<Self, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
Accepts as input a list of bits which, when interpreted in big-endian form, are a scalar.
Implementors
impl<F> FieldGadget<F, F> for FpGadget<F> where
F: PrimeField, [src]
F: PrimeField,
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]
CS: ConstraintSystem<F>,
pub fn one<CS>(_cs: CS) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn conditionally_add_constant<CS>(
&self,
_cs: CS,
bit: &Boolean,
coeff: F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
_cs: CS,
bit: &Boolean,
coeff: F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add<CS>(
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn double<CS>(&self, _cs: CS) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn double_in_place<CS>(
&mut self,
_cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
_cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub<CS>(
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn negate<CS>(&self, cs: CS) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn negate_in_place<CS>(
&mut self,
_cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
_cs: CS
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul<CS>(
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &FpGadget<F>
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add_constant<CS>(
&self,
_cs: CS,
other: &F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
_cs: CS,
other: &F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add_constant_in_place<CS>(
&mut self,
_cs: CS,
other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
_cs: CS,
other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant<CS>(
&self,
cs: CS,
other: &F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &F
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant_in_place<CS>(
&mut self,
_cs: CS,
other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
_cs: CS,
other: &F
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn inverse<CS>(&self, cs: CS) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn frobenius_map<CS>(
&self,
_cs: CS,
_power: usize
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
_cs: CS,
_power: usize
) -> Result<FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map_in_place<CS>(
&mut self,
_cs: CS,
_power: usize
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
_cs: CS,
_power: usize
) -> Result<&mut FpGadget<F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_equals<CS>(
&self,
cs: CS,
other: &FpGadget<F>,
result: &FpGadget<F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &FpGadget<F>,
result: &FpGadget<F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn square_equals<CS>(
&self,
cs: CS,
result: &FpGadget<F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
result: &FpGadget<F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: Fp6Parameters,
F: PrimeField,
<P as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
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]
&self
) -> <Fp6Gadget<P, F> as FieldGadget<Fp6<P>, F>>::Variable
pub fn zero<CS>(cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn one<CS>(cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn conditionally_add_constant<CS>(
&self,
cs: CS,
bit: &Boolean,
coeff: Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
bit: &Boolean,
coeff: Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add<CS>(
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub<CS>(
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn negate<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn negate_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul<CS>(
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp6Gadget<P, F>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
CS: ConstraintSystem<F>,
Use the Toom-Cook-3x method to compute multiplication.
pub fn inverse<CS>(&self, cs: CS) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn add_constant<CS>(
&self,
cs: CS,
other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
&mut self,
cs: CS,
other: &Fp6<P>
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant<CS>(
&self,
cs: CS,
other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp6<P>
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
Use the Toom-Cook-3x method to compute multiplication.
pub fn frobenius_map<CS>(
&self,
cs: CS,
power: usize
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
power: usize
) -> Result<Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map_in_place<CS>(
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp6Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: Fp2Parameters<Fp = F>,
F: PrimeField,
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]
&self
) -> <Fp2Gadget<P, F> as FieldGadget<Fp2<P>, F>>::Variable
pub fn zero<CS>(cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn one<CS>(cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn conditionally_add_constant<CS>(
&self,
cs: CS,
bit: &Boolean,
coeff: Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
bit: &Boolean,
coeff: Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add<CS>(
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub<CS>(
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn double<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn double_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn negate<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn negate_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul<CS>(
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp2Gadget<P, F>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn square<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn square_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn inverse<CS>(&self, cs: CS) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn mul_equals<CS>(
&self,
cs: CS,
other: &Fp2Gadget<P, F>,
result: &Fp2Gadget<P, F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp2Gadget<P, F>,
result: &Fp2Gadget<P, F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map<CS>(
&self,
cs: CS,
power: usize
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
power: usize
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map_in_place<CS>(
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add_constant<CS>(
&self,
cs: CS,
other: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
&mut self,
cs: CS,
other: &Fp2<P>
) -> Result<&mut Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant<CS>(
&self,
cs: CS,
fe: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
fe: &Fp2<P>
) -> Result<Fp2Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: Fp12Parameters,
F: PrimeField,
<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
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]
&self
) -> <Fp12Gadget<P, F> as FieldGadget<Fp12<P>, F>>::Variable
pub fn zero<CS>(cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn one<CS>(cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn conditionally_add_constant<CS>(
&self,
cs: CS,
bit: &Boolean,
coeff: Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
bit: &Boolean,
coeff: Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn add<CS>(
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
&mut self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn sub<CS>(
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
&mut self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn negate<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn negate_in_place<CS>(
&mut self,
cs: CS
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul<CS>(
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12Gadget<P, F>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn square<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn add_constant<CS>(
&self,
cs: CS,
other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
&mut self,
cs: CS,
other: &Fp12<P>
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn mul_by_constant<CS>(
&self,
cs: CS,
other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12<P>
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map<CS>(
&self,
cs: CS,
power: usize
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
power: usize
) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn frobenius_map_in_place<CS>(
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&mut self,
cs: CS,
power: usize
) -> Result<&mut Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>,
pub fn inverse<CS>(&self, cs: CS) -> Result<Fp12Gadget<P, F>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn mul_equals<CS>(
&self,
cs: CS,
other: &Fp12Gadget<P, F>,
result: &Fp12Gadget<P, F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Fp12Gadget<P, F>,
result: &Fp12Gadget<P, F>
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,