Struct ark_r1cs_std::groups::curves::short_weierstrass::AffineVar
source · pub struct AffineVar<P: SWModelParameters, F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,{
pub x: F,
pub y: F,
pub infinity: Boolean<<P::BaseField as Field>::BasePrimeField>,
/* private fields */
}
Expand description
An affine representation of a curve point.
Fields§
§x: F
The x-coordinate.
y: F
The y-coordinate.
infinity: Boolean<<P::BaseField as Field>::BasePrimeField>
Is self
the point at infinity.
Implementations§
source§impl<P, F> AffineVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> AffineVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
sourcepub fn value(&self) -> Result<SWAffine<P>, SynthesisError>
pub fn value(&self) -> Result<SWAffine<P>, SynthesisError>
Returns the value assigned to self
in the underlying
constraint system.
Trait Implementations§
source§impl<P: SWModelParameters, F> Clone for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
impl<P: SWModelParameters, F> Clone for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Clone + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
source§impl<P: SWModelParameters, F> Debug for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
impl<P: SWModelParameters, F> Debug for AffineVar<P, F>where
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
F: Debug + FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
source§impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToConstraintFieldGadget<<<P as CurveConfig>::BaseField as Field>::BasePrimeField> for AffineVar<P, F>where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField> + ToConstraintFieldGadget<<P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
source§fn to_constraint_field(
&self
) -> Result<Vec<FpVar<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
fn to_constraint_field(
&self
) -> Result<Vec<FpVar<<P::BaseField as Field>::BasePrimeField>>, SynthesisError>
Converts
self
to FpVar<ConstraintF>
variables.