Struct ark_r1cs_std::fields::quadratic_extension::QuadExtVar [−][src]
pub struct QuadExtVar<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>, { pub c0: BF, pub c1: BF, // some fields omitted }
Expand description
This struct is the R1CS
equivalent of the quadratic extension field type
in ark-ff
, i.e. ark_ff::QuadExtField
.
Fields
c0: BF
The zero-th coefficient of this field element.
c1: BF
The first coefficient of this field element.
Implementations
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
Multiplies a variable of the base field by the quadratic nonresidue
P::NONRESIDUE
that is used to construct the extension field.
Multiplies self
by a constant from the base field.
Sets self = self.mul_by_base_field_constant(fe)
.
This is only to be used when the element is known to be in the cyclotomic subgroup.
pub fn cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>
) -> Result<Self, SynthesisError> where
Self: FieldVar<QuadExtField<P>, P::BasePrimeField>,
pub fn cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>
) -> Result<Self, SynthesisError> where
Self: FieldVar<QuadExtField<P>, P::BasePrimeField>,
This is only to be used when the element is known to be in the cyclotomic subgroup.
impl<P: Fp12Parameters> QuadExtVar<CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<<P as Fp12Parameters>::Fp6Params>>, Fp12ParamsWrapper<P>>
impl<P: Fp12Parameters> QuadExtVar<CubicExtVar<QuadExtVar<FpVar<<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>>, Fp6ParamsWrapper<<P as Fp12Parameters>::Fp6Params>>, Fp12ParamsWrapper<P>>
pub fn mul_by_014(
&self,
c0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
c1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>
) -> Result<Self, SynthesisError>
pub fn mul_by_014(
&self,
c0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
c1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>
) -> Result<Self, SynthesisError>
Multiplies by a sparse element of the form (c0 = (c0, c1, 0), c1 = (0, d1, 0))
.
pub fn mul_by_034(
&self,
c0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>
) -> Result<Self, SynthesisError>
pub fn mul_by_034(
&self,
c0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d0: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>,
d1: &Fp2Var<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>
) -> Result<Self, SynthesisError>
Multiplies by a sparse element of the form (c0 = (c0, 0, 0), c1 = (d0, d1, 0))
.
Squares self
when self
is in the cyclotomic subgroup.
pub fn optimized_cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>
) -> Result<Self, SynthesisError>
pub fn optimized_cyclotomic_exp(
&self,
exponent: impl AsRef<[u64]>
) -> Result<Self, SynthesisError>
Like Self::cyclotomic_exp
, but additionally uses cyclotomic squaring.
Trait Implementations
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Add<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the +
operator.
Performs the +
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> AddAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the +=
operation. Read more
impl<BF, P> AllocVar<QuadExtField<P>, <P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> AllocVar<QuadExtField<P>, <P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
fn new_variable<T: Borrow<QuadExtField<P>>>(
cs: impl Into<Namespace<P::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<QuadExtField<P>>>(
cs: impl Into<Namespace<P::BasePrimeField>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
mode: AllocationMode
) -> Result<Self, SynthesisError>
Allocates a new variable of type Self
in the ConstraintSystem
cs
.
The mode of allocation is decided by mode
. Read more
fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>
) -> Result<Self, SynthesisError>
Allocates a new constant of type Self
in the ConstraintSystem
cs
. Read more
fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_input<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
Allocates a new public input of type Self
in the ConstraintSystem
cs
. Read more
fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
fn new_witness<T: Borrow<V>>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>
) -> Result<Self, SynthesisError>
Allocates a new private witness of type Self
in the ConstraintSystem
cs
. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Clone for QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Clone for QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Clone,
impl<BF, P> CondSelectGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> CondSelectGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
fn conditionally_select(
cond: &Boolean<P::BasePrimeField>,
true_value: &Self,
false_value: &Self
) -> Result<Self, SynthesisError>
fn conditionally_select(
cond: &Boolean<P::BasePrimeField>,
true_value: &Self,
false_value: &Self
) -> Result<Self, SynthesisError>
If cond == &Boolean::TRUE
, then this returns true_value
; else,
returns false_value
. Read more
fn conditionally_select_power_of_two_vector(
position: &[Boolean<ConstraintF>],
values: &[Self]
) -> Result<Self, SynthesisError>
fn conditionally_select_power_of_two_vector(
position: &[Boolean<ConstraintF>],
values: &[Self]
) -> Result<Self, SynthesisError>
Returns an element of values
whose index in represented by position
.
position
is an array of boolean that represents an unsigned integer in big endian order. Read more
impl<P: Fp6Parameters> CubicExtVarParams<QuadExtVar<FpVar<<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp6Parameters>::Fp2Params>>> for Fp6ParamsWrapper<P>
impl<P: Fp6Parameters> CubicExtVarParams<QuadExtVar<FpVar<<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp6Parameters>::Fp2Params>>> for Fp6ParamsWrapper<P>
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Debug for QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Debug for QuadExtVar<BF, P> where
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
BF: Debug,
impl<BF, P> EqGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> EqGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
Output a Boolean
value representing whether self.value() == other.value()
. Read more
fn conditional_enforce_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>
) -> Result<(), SynthesisError>
fn conditional_enforce_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>
) -> Result<(), SynthesisError>
If should_enforce == true
, enforce that self
and other
are equal;
else, enforce a vacuously true statement. Read more
fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>
) -> Result<(), SynthesisError>
fn conditional_enforce_not_equal(
&self,
other: &Self,
condition: &Boolean<P::BasePrimeField>
) -> Result<(), SynthesisError>
If should_enforce == true
, enforce that self
and other
are not
equal; else, enforce a vacuously true statement. Read more
Output a Boolean
value representing whether self.value() != other.value()
. Read more
Enforce that self
and other
are equal. Read more
Enforce that self
and other
are not equal. Read more
impl<BF, P> FieldVar<QuadExtField<P>, <P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> FieldVar<QuadExtField<P>, <P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
Returns a constant with value v
. Read more
Computes self + self
.
Coputes -self
.
Computes self * self
. Read more
Enforces that self * other == result
.
Computes the frobenius map over self
.
Computes result
such that self * result == Self::one()
.
Returns a Boolean
representing whether self == Self::zero()
.
Returns a Boolean
representing whether self == Self::one()
.
Sets self = self + self
.
Sets self = -self
.
Sets self = self.square()
.
Enforces that self * self == result
.
Returns (self / d)
.
The constraint system will be unsatisfiable when d = 0
. Read more
Sets self = self.frobenius_map()
.
Comptues self^bits
, where bits
is a little-endian bit-wise
decomposition of the exponent. Read more
Computes self^S
, where S is interpreted as an little-endian
u64-decomposition of an integer. Read more
impl<BF, P> From<Boolean<<P as QuadExtParameters>::BasePrimeField>> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> From<Boolean<<P as QuadExtParameters>::BasePrimeField>> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
Performs the conversion.
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Mul<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the *
operator.
Performs the *
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> MulAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the *=
operation. Read more
impl<P: Fp4Parameters> QuadExtVarParams<QuadExtVar<FpVar<<<P as Fp4Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp4Parameters>::Fp2Params>>> for Fp4ParamsWrapper<P>
impl<P: Fp4Parameters> QuadExtVarParams<QuadExtVar<FpVar<<<P as Fp4Parameters>::Fp2Params as Fp2Parameters>::Fp>, Fp2ParamsWrapper<<P as Fp4Parameters>::Fp2Params>>> for Fp4ParamsWrapper<P>
impl<BF, P> R1CSVar<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> R1CSVar<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
type Value = QuadExtField<P>
type Value = QuadExtField<P>
The type of the “native” value that Self
represents in the constraint
system. Read more
Returns the underlying ConstraintSystemRef
. Read more
Returns the value that is assigned to self
in the underlying
ConstraintSystem
. Read more
Returns true
if self
is a circuit-generation-time constant.
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<&'a QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtField<P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> Sub<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
type Output = QuadExtVar<BF, P>
type Output = QuadExtVar<BF, P>
The resulting type after applying the -
operator.
Performs the -
operation. Read more
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<'a, BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<&'a QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<QuadExtField<P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
impl<BF: FieldVar<P::BaseField, P::BasePrimeField>, P: QuadExtVarParams<BF>> SubAssign<QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
Performs the -=
operation. Read more
impl<BF, P> ThreeBitCondNegLookupGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> ThreeBitCondNegLookupGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField> + ThreeBitCondNegLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
type TableConstant = QuadExtField<P>
type TableConstant = QuadExtField<P>
The type of values being looked up.
fn three_bit_cond_neg_lookup(
b: &[Boolean<P::BasePrimeField>],
b0b1: &Boolean<P::BasePrimeField>,
c: &[Self::TableConstant]
) -> Result<Self, SynthesisError>
fn three_bit_cond_neg_lookup(
b: &[Boolean<P::BasePrimeField>],
b0b1: &Boolean<P::BasePrimeField>,
c: &[Self::TableConstant]
) -> Result<Self, SynthesisError>
Interprets the slice bits
as a two-bit integer b = bits[0] + (bits[1] << 1)
, and then outputs constants[b] * c
, where c = if bits[2] { -1 } else { 1 };
. Read more
impl<BF, P> ToBitsGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> ToBitsGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
Outputs the canonical little-endian bit-wise representation of self
. Read more
Outputs a possibly non-unique little-endian bit-wise representation of
self
. Read more
Outputs the canonical big-endian bit-wise representation of self
.
Outputs a possibly non-unique big-endian bit-wise representation of
self
. Read more
impl<BF, P> ToBytesGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> ToBytesGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> ToConstraintFieldGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
BF: ToConstraintFieldGadget<P::BasePrimeField>,
impl<BF, P> ToConstraintFieldGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
BF: ToConstraintFieldGadget<P::BasePrimeField>,
Converts self
to FpVar<ConstraintF>
variables.
impl<BF, P> TwoBitLookupGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<BF, P> TwoBitLookupGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField> + TwoBitLookupGadget<P::BasePrimeField, TableConstant = P::BaseField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
type TableConstant = QuadExtField<P>
type TableConstant = QuadExtField<P>
The type of values being looked up.
fn two_bit_lookup(
b: &[Boolean<P::BasePrimeField>],
c: &[Self::TableConstant]
) -> Result<Self, SynthesisError>
fn two_bit_lookup(
b: &[Boolean<P::BasePrimeField>],
c: &[Self::TableConstant]
) -> Result<Self, SynthesisError>
Interprets the slice bits
as a two-bit integer b = bits[0] + (bits[1] << 1)
, and then outputs constants[b]
. Read more
impl<'a, BF, P> FieldOpsBounds<'a, QuadExtField<P>, QuadExtVar<BF, P>> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<'a, BF, P> FieldOpsBounds<'a, QuadExtField<P>, QuadExtVar<BF, P>> for &'a QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
Auto Trait Implementations
impl<BF, P> RefUnwindSafe for QuadExtVar<BF, P> where
BF: RefUnwindSafe,
P: RefUnwindSafe,
impl<BF, P> Send for QuadExtVar<BF, P> where
BF: Send,
impl<BF, P> Sync for QuadExtVar<BF, P> where
BF: Sync,
impl<BF, P> Unpin for QuadExtVar<BF, P> where
BF: Unpin,
P: Unpin,
impl<BF, P> UnwindSafe for QuadExtVar<BF, P> where
BF: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V