ark_test_curves::models::short_weierstrass

Struct Projective

Source
pub struct Projective<P>
where P: SWCurveConfig,
{ pub x: <P as CurveConfig>::BaseField, pub y: <P as CurveConfig>::BaseField, pub z: <P as CurveConfig>::BaseField, }
Expand description

Jacobian coordinates for a point on an elliptic curve in short Weierstrass form, over the base field P::BaseField. This struct implements arithmetic via the Jacobian formulae

Fields§

§x: <P as CurveConfig>::BaseField

X / Z projection of the affine X

§y: <P as CurveConfig>::BaseField

Y / Z projection of the affine Y

§z: <P as CurveConfig>::BaseField

Projective multiplicative inverse. Will be 0 only at infinity.

Implementations§

Source§

impl<P> Projective<P>
where P: SWCurveConfig,

Source

pub const fn new_unchecked( x: <P as CurveConfig>::BaseField, y: <P as CurveConfig>::BaseField, z: <P as CurveConfig>::BaseField, ) -> Projective<P>

Constructs a new group element without checking whether the coordinates specify a point in the subgroup.

Source

pub fn new( x: <P as CurveConfig>::BaseField, y: <P as CurveConfig>::BaseField, z: <P as CurveConfig>::BaseField, ) -> Projective<P>

Constructs a new group element in a way while enforcing that points are in the prime-order subgroup.

Trait Implementations§

Source§

impl<'a, 'b, P> Add<&'a Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'a, P> Add<&'a Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'a, P> Add<&'a Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'a, 'b, P> Add<&'a mut Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'a, P> Add<&'a mut Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'b, P> Add<Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<P> Add<Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<P, T> Add<T> for Projective<P>
where P: SWCurveConfig, T: Borrow<Affine<P>>,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: T) -> Projective<P>

Performs the + operation. Read more
Source§

impl<P> Add for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Projective<P>) -> Projective<P>

Performs the + operation. Read more
Source§

impl<'a, P> AddAssign<&'a Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn add_assign(&mut self, other: &'a Projective<P>)

Performs the += operation. Read more
Source§

impl<'a, P> AddAssign<&'a mut Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn add_assign(&mut self, other: &'a mut Projective<P>)

Performs the += operation. Read more
Source§

impl<P, T> AddAssign<T> for Projective<P>
where P: SWCurveConfig, T: Borrow<Affine<P>>,

Source§

impl<P> AddAssign for Projective<P>
where P: SWCurveConfig,

Source§

fn add_assign(&mut self, other: Projective<P>)

Performs the += operation. Read more
Source§

impl<P> AdditiveGroup for Projective<P>
where P: SWCurveConfig,

Source§

fn double_in_place(&mut self) -> &mut Projective<P>

Sets self = 2 * self. Note that Jacobian formulae are incomplete, and so doubling cannot be computed as self + self. Instead, this implementation uses the following specialized doubling formulae:

Source§

const ZERO: Projective<P> = _

The additive identity of the field.
Source§

type Scalar = <P as CurveConfig>::ScalarField

Source§

fn double(&self) -> Self

Doubles self.
Source§

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.
Source§

impl<P> CanonicalDeserialize for Projective<P>
where P: SWCurveConfig,

Source§

fn deserialize_with_mode<R>( reader: R, compress: Compress, validate: Validate, ) -> Result<Projective<P>, SerializationError>
where R: Read,

The general deserialize method that takes in customization flags.
Source§

fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_compressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

impl<P> CanonicalSerialize for Projective<P>
where P: SWCurveConfig,

Source§

fn serialize_with_mode<W>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>
where W: Write,

The general serialize method that takes in customization flags.
Source§

fn serialized_size(&self, compress: Compress) -> usize

Source§

fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn compressed_size(&self) -> usize

Source§

fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn uncompressed_size(&self) -> usize

Source§

impl<P> Clone for Projective<P>

Source§

fn clone(&self) -> Projective<P>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P> CurveGroup for Projective<P>
where P: SWCurveConfig,

Source§

fn normalize_batch( v: &[Projective<P>], ) -> Vec<<Projective<P> as CurveGroup>::Affine>

Normalizes a slice of projective elements so that conversion to affine is cheap.

In more detail, this method converts a curve point in Jacobian coordinates (x, y, z) into an equivalent representation (x/z^2, y/z^3, 1).

For N = v.len(), this costs 1 inversion + 6N field multiplications + N field squarings.

(Where batch inversion comprises 3N field multiplications + 1 inversion of these operations)

Source§

type Config = P

Source§

type BaseField = <P as CurveConfig>::BaseField

The field over which this curve is defined.
Source§

type Affine = Affine<P>

The affine representation of this element.
Source§

type FullGroup = Affine<P>

Type representing an element of the full elliptic curve group, not just the prime order subgroup.
Source§

fn into_affine(self) -> Self::Affine

Converts self into the affine representation.
Source§

impl<P> Debug for Projective<P>
where P: SWCurveConfig,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<P> Default for Projective<P>
where P: SWCurveConfig,

Source§

fn default() -> Projective<P>

Returns the “default value” for a type. Read more
Source§

impl<P> Display for Projective<P>
where P: SWCurveConfig,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a, P> From<&'a Projective<<P as BW6Config>::G1Config>> for G1Prepared<P>
where P: BW6Config,

Source§

fn from(q: &'a Projective<<P as BW6Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as BW6Config>::G2Config>> for G2Prepared<P>
where P: BW6Config,

Source§

fn from(q: &'a Projective<<P as BW6Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as Bls12Config>::G1Config>> for G1Prepared<P>
where P: Bls12Config,

Source§

fn from(q: &'a Projective<<P as Bls12Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as Bls12Config>::G2Config>> for G2Prepared<P>
where P: Bls12Config,

Source§

fn from(q: &'a Projective<<P as Bls12Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as BnConfig>::G1Config>> for G1Prepared<P>
where P: BnConfig,

Source§

fn from(q: &'a Projective<<P as BnConfig>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as BnConfig>::G2Config>> for G2Prepared<P>
where P: BnConfig,

Source§

fn from(q: &'a Projective<<P as BnConfig>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as MNT4Config>::G1Config>> for G1Prepared<P>
where P: MNT4Config,

Source§

fn from(g1: &'a Projective<<P as MNT4Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as MNT4Config>::G2Config>> for G2Prepared<P>
where P: MNT4Config,

Source§

fn from(g2: &'a Projective<<P as MNT4Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as MNT6Config>::G1Config>> for G1Prepared<P>
where P: MNT6Config,

Source§

fn from(g1: &'a Projective<<P as MNT6Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<'a, P> From<&'a Projective<<P as MNT6Config>::G2Config>> for G2Prepared<P>
where P: MNT6Config,

Source§

fn from(g2: &'a Projective<<P as MNT6Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Affine<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn from(p: Affine<P>) -> Projective<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as BW6Config>::G1Config>> for G1Prepared<P>
where P: BW6Config,

Source§

fn from(q: Projective<<P as BW6Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as BW6Config>::G2Config>> for G2Prepared<P>
where P: BW6Config,

Source§

fn from(q: Projective<<P as BW6Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as Bls12Config>::G1Config>> for G1Prepared<P>
where P: Bls12Config,

Source§

fn from(q: Projective<<P as Bls12Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as Bls12Config>::G2Config>> for G2Prepared<P>
where P: Bls12Config,

Source§

fn from(q: Projective<<P as Bls12Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as BnConfig>::G1Config>> for G1Prepared<P>
where P: BnConfig,

Source§

fn from(q: Projective<<P as BnConfig>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as BnConfig>::G2Config>> for G2Prepared<P>
where P: BnConfig,

Source§

fn from(q: Projective<<P as BnConfig>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as MNT4Config>::G1Config>> for G1Prepared<P>
where P: MNT4Config,

Source§

fn from(g1: Projective<<P as MNT4Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as MNT4Config>::G2Config>> for G2Prepared<P>
where P: MNT4Config,

Source§

fn from(g2: Projective<<P as MNT4Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as MNT6Config>::G1Config>> for G1Prepared<P>
where P: MNT6Config,

Source§

fn from(g1: Projective<<P as MNT6Config>::G1Config>) -> G1Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<<P as MNT6Config>::G2Config>> for G2Prepared<P>
where P: MNT6Config,

Source§

fn from(g2: Projective<<P as MNT6Config>::G2Config>) -> G2Prepared<P>

Converts to this type from the input type.
Source§

impl<P> From<Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

fn from(p: Projective<P>) -> Affine<P>

Converts to this type from the input type.
Source§

impl<P> Hash for Projective<P>
where P: SWCurveConfig,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<P> MapToCurve<Projective<P>> for SWUMap<P>
where P: SWUConfig,

Source§

fn check_parameters() -> Result<(), HashToCurveError>

Checks if P represents a valid map.

Source§

fn map_to_curve( element: <P as CurveConfig>::BaseField, ) -> Result<Affine<P>, HashToCurveError>

Map an arbitrary base field element to a curve point. Based on https://github.com/zcash/pasta_curves/blob/main/src/hashtocurve.rs.

Source§

impl<P> MapToCurve<Projective<P>> for WBMap<P>
where P: WBConfig,

Source§

fn check_parameters() -> Result<(), HashToCurveError>

Checks if P represents a valid map.

Source§

fn map_to_curve( element: <Affine<P> as AffineRepr>::BaseField, ) -> Result<Affine<P>, HashToCurveError>

Map random field point to a random curve point inspired from https://github.com/zcash/pasta_curves/blob/main/src/hashtocurve.rs

Source§

impl<P, T> Mul<T> for Projective<P>

Source§

type Output = Projective<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: T) -> Projective<P>

Performs the * operation. Read more
Source§

impl<P, T> MulAssign<T> for Projective<P>

Source§

fn mul_assign(&mut self, other: T)

Performs the *= operation. Read more
Source§

impl<P> Neg for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Projective<P>

Performs the unary - operation. Read more
Source§

impl<P> PartialEq<Affine<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn eq(&self, other: &Affine<P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P> PartialEq<Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

fn eq(&self, other: &Projective<P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P> PartialEq for Projective<P>
where P: SWCurveConfig,

Source§

fn eq(&self, other: &Projective<P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P> PrimeGroup for Projective<P>
where P: SWCurveConfig,

Source§

type ScalarField = <P as CurveConfig>::ScalarField

The scalar field F_r, where r is the order of this group.
Source§

fn generator() -> Projective<P>

Returns a fixed generator of this group.
Source§

fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Projective<P>

Performs scalar multiplication of this element.
Source§

fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self

Computes other * self, where other is a big-endian bit representation of some integer.
Source§

impl<P> ScalarMul for Projective<P>
where P: SWCurveConfig,

Source§

const NEGATION_IS_CHEAP: bool = true

Source§

type MulBase = Affine<P>

Source§

fn batch_convert_to_mul_base( bases: &[Projective<P>], ) -> Vec<<Projective<P> as ScalarMul>::MulBase>

Source§

fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>

Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§

fn batch_mul_with_preprocessing( table: &BatchMulPreprocessing<Self>, v: &[Self::ScalarField], ) -> Vec<Self::MulBase>

Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§

impl<'a, 'b, P> Sub<&'a Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'a, P> Sub<&'a Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'a, P> Sub<&'a Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'a, 'b, P> Sub<&'a mut Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'a, P> Sub<&'a mut Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'b, P> Sub<Projective<P>> for &'b Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<P> Sub<Projective<P>> for Affine<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<P, T> Sub<T> for Projective<P>
where P: SWCurveConfig, T: Borrow<Affine<P>>,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: T) -> Projective<P>

Performs the - operation. Read more
Source§

impl<P> Sub for Projective<P>
where P: SWCurveConfig,

Source§

type Output = Projective<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Projective<P>) -> Projective<P>

Performs the - operation. Read more
Source§

impl<'a, P> SubAssign<&'a Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn sub_assign(&mut self, other: &'a Projective<P>)

Performs the -= operation. Read more
Source§

impl<'a, P> SubAssign<&'a mut Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn sub_assign(&mut self, other: &'a mut Projective<P>)

Performs the -= operation. Read more
Source§

impl<P, T> SubAssign<T> for Projective<P>
where P: SWCurveConfig, T: Borrow<Affine<P>>,

Source§

fn sub_assign(&mut self, other: T)

Performs the -= operation. Read more
Source§

impl<P> SubAssign for Projective<P>
where P: SWCurveConfig,

Source§

fn sub_assign(&mut self, other: Projective<P>)

Performs the -= operation. Read more
Source§

impl<'a, P> Sum<&'a Projective<P>> for Projective<P>
where P: SWCurveConfig,

Source§

fn sum<I>(iter: I) -> Projective<P>
where I: Iterator<Item = &'a Projective<P>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P, T> Sum<T> for Projective<P>
where P: SWCurveConfig, T: Borrow<Affine<P>>,

Source§

fn sum<I>(iter: I) -> Projective<P>
where I: Iterator<Item = T>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P> Sum for Projective<P>
where P: SWCurveConfig,

Source§

fn sum<I>(iter: I) -> Projective<P>
where I: Iterator<Item = Projective<P>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<M, ConstraintF> ToConstraintField<ConstraintF> for Projective<M>
where M: SWCurveConfig, ConstraintF: Field, <M as CurveConfig>::BaseField: ToConstraintField<ConstraintF>,

Source§

fn to_field_elements(&self) -> Option<Vec<ConstraintF>>

Source§

impl<P> Valid for Projective<P>
where P: SWCurveConfig,

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Projective<P>> + Send, ) -> Result<(), SerializationError>
where Projective<P>: 'a,

Source§

impl<P> VariableBaseMSM for Projective<P>
where P: SWCurveConfig,

Source§

fn msm( bases: &[<Projective<P> as ScalarMul>::MulBase], bigints: &[<Projective<P> as PrimeGroup>::ScalarField], ) -> Result<Projective<P>, usize>

Performs multi-scalar multiplication. Read more
Source§

fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self

Computes an inner product between the PrimeField elements in scalars and the corresponding group elements in bases. Read more
Source§

fn msm_bigint( bases: &[Self::MulBase], bigints: &[<Self::ScalarField as PrimeField>::BigInt], ) -> Self

Optimized implementation of multi-scalar multiplication.
Source§

fn msm_chunks<I, J>(bases_stream: &J, scalars_stream: &I) -> Self
where I: Iterable + ?Sized, <I as Iterable>::Item: Borrow<Self::ScalarField>, J: Iterable, <J as Iterable>::Item: Borrow<Self::MulBase>,

Streaming multi-scalar multiplication algorithm with hard-coded chunk size.
Source§

impl<P> Zero for Projective<P>
where P: SWCurveConfig,

Source§

fn zero() -> Projective<P>

Returns the point at infinity, which always has Z = 0.

Source§

fn is_zero(&self) -> bool

Checks whether self.z.is_zero().

Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<P> Zeroize for Projective<P>
where P: SWCurveConfig,

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl<P> Copy for Projective<P>

Source§

impl<P> Eq for Projective<P>
where P: SWCurveConfig,

Auto Trait Implementations§

§

impl<P> Freeze for Projective<P>
where <P as CurveConfig>::BaseField: Freeze,

§

impl<P> RefUnwindSafe for Projective<P>

§

impl<P> Send for Projective<P>

§

impl<P> Sync for Projective<P>

§

impl<P> Unpin for Projective<P>
where <P as CurveConfig>::BaseField: Unpin,

§

impl<P> UnwindSafe for Projective<P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CanonicalSerializeHashExt for T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UniformRand for T

Source§

fn rand<R>(rng: &mut R) -> T
where R: Rng + ?Sized,

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, F> DomainCoeff<F> for T
where F: FftField, T: Copy + Send + Sync + Add<Output = T> + Sub<Output = T> + AddAssign + SubAssign + Zero + MulAssign<F> + Debug + PartialEq,