pub struct AffinePoint<'a, E: Engine, G: GenericCurveAffine>{
pub x: FieldElement<'a, E, G::Base>,
pub y: FieldElement<'a, E, G::Base>,
pub value: Option<G>,
}
Fields§
§x: FieldElement<'a, E, G::Base>
§y: FieldElement<'a, E, G::Base>
§value: Option<G>
Implementations§
Source§impl<'a, E: Engine, G: GenericCurveAffine> AffinePoint<'a, E, G>
impl<'a, E: Engine, G: GenericCurveAffine> AffinePoint<'a, E, G>
pub fn get_x(&self) -> FieldElement<'a, E, G::Base>
pub fn get_y(&self) -> FieldElement<'a, E, G::Base>
pub fn alloc<CS: ConstraintSystem<E>>( cs: &mut CS, value: Option<G>, params: &'a RnsParameters<E, G::Base>, ) -> Result<Self, SynthesisError>
pub fn from_xy_unchecked( x: FieldElement<'a, E, G::Base>, y: FieldElement<'a, E, G::Base>, ) -> Self
pub fn constant(value: G, params: &'a RnsParameters<E, G::Base>) -> Self
pub fn zero(params: &'a RnsParameters<E, G::Base>) -> Self
pub fn is_constant(&self) -> bool
pub fn get_value(&self) -> Option<G>
pub fn equals<CS: ConstraintSystem<E>>( cs: &mut CS, this: Self, other: Self, ) -> Result<(Boolean, (Self, Self)), SynthesisError>
pub fn negate<CS: ConstraintSystem<E>>( self, cs: &mut CS, ) -> Result<(Self, Self), SynthesisError>
pub fn conditionally_negate<CS: ConstraintSystem<E>>( self, cs: &mut CS, flag: &Boolean, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn add_unequal<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn add_unequal_unchecked<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn sub_unequal<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn double<CS: ConstraintSystem<E>>( self, cs: &mut CS, ) -> Result<(Self, Self), SynthesisError>
pub fn double_and_add<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn double_and_add_unchecked<CS: ConstraintSystem<E>>( self, cs: &mut CS, other: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn mul_by_fixed_scalar<CS: ConstraintSystem<E>>( self, _cs: &mut CS, _scalar: &G::Scalar, ) -> Result<(Self, Self), SynthesisError>
pub fn select<CS: ConstraintSystem<E>>( cs: &mut CS, flag: &Boolean, first: Self, second: Self, ) -> Result<(Self, (Self, Self)), SynthesisError>
pub fn is_on_curve_for_zero_a<CS: ConstraintSystem<E>>( self, cs: &mut CS, curve_b: G::Base, ) -> Result<(Boolean, Self), SynthesisError>
pub fn mul_by_skewed_scalar_decomposition<CS: ConstraintSystem<E>>( self, cs: &mut CS, entries: &[Boolean], offset_generator: G, ) -> Result<(Self, Self), SynthesisError>
Source§impl<'a, E: Engine> AffinePoint<'a, E, E::G1Affine>
impl<'a, E: Engine> AffinePoint<'a, E, E::G1Affine>
pub fn mul<CS: ConstraintSystem<E>>( self, cs: &mut CS, scalar: &Num<E>, bit_limit: Option<usize>, ) -> Result<(Self, Self), SynthesisError>
pub fn multiexp<CS: ConstraintSystem<E>>( cs: &mut CS, scalars: &[Num<E>], points: &[Self], bit_limit: Option<usize>, ) -> Result<Self, SynthesisError>
pub fn multiexp_using_endomorphism<CS: ConstraintSystem<E>>( cs: &mut CS, scalars: &[Num<E>], points: &[Self], endo_parameters: &EndomorphismParameters<E>, ) -> Result<Self, SynthesisError>
Trait Implementations§
Source§impl<'a, E: Clone + Engine, G: Clone + GenericCurveAffine> Clone for AffinePoint<'a, E, G>
impl<'a, E: Clone + Engine, G: Clone + GenericCurveAffine> Clone for AffinePoint<'a, E, G>
Source§fn clone(&self) -> AffinePoint<'a, E, G>
fn clone(&self) -> AffinePoint<'a, E, G>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, E: Debug + Engine, G: Debug + GenericCurveAffine> Debug for AffinePoint<'a, E, G>
impl<'a, E: Debug + Engine, G: Debug + GenericCurveAffine> Debug for AffinePoint<'a, E, G>
Auto Trait Implementations§
impl<'a, E, G> Freeze for AffinePoint<'a, E, G>
impl<'a, E, G> RefUnwindSafe for AffinePoint<'a, E, G>where
<G as GenericCurveAffine>::Base: Sized + RefUnwindSafe,
G: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
impl<'a, E, G> Send for AffinePoint<'a, E, G>
impl<'a, E, G> Sync for AffinePoint<'a, E, G>
impl<'a, E, G> Unpin for AffinePoint<'a, E, G>
impl<'a, E, G> UnwindSafe for AffinePoint<'a, E, G>where
<G as GenericCurveAffine>::Base: Sized + UnwindSafe + RefUnwindSafe,
G: UnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more