pub struct Projective<P: Parameters> {
pub x: P::BaseField,
pub y: P::BaseField,
pub z: P::BaseField,
}
Fields§
§x: P::BaseField
§y: P::BaseField
§z: P::BaseField
Implementations§
source§impl<P: Parameters> Projective<P>
impl<P: Parameters> Projective<P>
Trait Implementations§
source§impl<P: Parameters> Add<&&Projective<P>> for Projective<P>
impl<P: Parameters> Add<&&Projective<P>> for Projective<P>
source§impl<'a, P: Parameters> Add<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> Add<&'a Projective<P>> for Projective<P>
source§impl<'a, P: Parameters> Add<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> Add<&'a mut Projective<P>> for Projective<P>
source§impl<P: Parameters> Add<Projective<P>> for Projective<P>
impl<P: Parameters> Add<Projective<P>> for Projective<P>
source§impl<P: Parameters> AddAssign<&&Projective<P>> for Projective<P>
impl<P: Parameters> AddAssign<&&Projective<P>> for Projective<P>
source§fn add_assign(&mut self, other: &&Self)
fn add_assign(&mut self, other: &&Self)
Performs the
+=
operation. Read moresource§impl<'a, P: Parameters> AddAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> AddAssign<&'a Projective<P>> for Projective<P>
source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the
+=
operation. Read moresource§impl<'a, P: Parameters> AddAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> AddAssign<&'a mut Projective<P>> for Projective<P>
source§fn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the
+=
operation. Read moresource§impl<P: Parameters> AddAssign<Projective<P>> for Projective<P>
impl<P: Parameters> AddAssign<Projective<P>> for Projective<P>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<P: Parameters> CanonicalDeserialize for Projective<P>
impl<P: Parameters> CanonicalDeserialize for Projective<P>
fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
source§impl<P: Parameters> CanonicalSerialize for Projective<P>
impl<P: Parameters> CanonicalSerialize for Projective<P>
fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn uncompressed_size(&self) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
source§impl<P: Clone + Parameters> Clone for Projective<P>where
P::BaseField: Clone,
impl<P: Clone + Parameters> Clone for Projective<P>where
P::BaseField: Clone,
source§fn clone(&self) -> Projective<P>
fn clone(&self) -> Projective<P>
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<P: Debug + Parameters> Debug for Projective<P>where
P::BaseField: Debug,
impl<P: Debug + Parameters> Debug for Projective<P>where
P::BaseField: Debug,
source§impl<P: Parameters> Default for Projective<P>
impl<P: Parameters> Default for Projective<P>
source§impl<P: Parameters> Display for Projective<P>
impl<P: Parameters> Display for Projective<P>
source§impl<P: Parameters> Distribution<Projective<P>> for Standard
impl<P: Parameters> Distribution<Projective<P>> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Projective<P>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Projective<P>
Generate a random value of
T
, using rng
as the source of randomness.source§impl<P: Parameters> From<Affine<P>> for Projective<P>
impl<P: Parameters> From<Affine<P>> for Projective<P>
The affine point X, Y is represented in the Jacobian coordinates with Z = 1.
source§fn from(p: Affine<P>) -> Projective<P>
fn from(p: Affine<P>) -> Projective<P>
Converts to this type from the input type.
source§impl<P: Parameters> From<Projective<P>> for Affine<P>
impl<P: Parameters> From<Projective<P>> for Affine<P>
source§fn from(p: Projective<P>) -> Affine<P>
fn from(p: Projective<P>) -> Affine<P>
Converts to this type from the input type.
source§impl<P: Parameters> FromBytes for Projective<P>
impl<P: Parameters> FromBytes for Projective<P>
source§impl<P: Parameters> Hash for Projective<P>
impl<P: Parameters> Hash for Projective<P>
source§impl<P: Parameters> Mul<<P as ModelParameters>::ScalarField> for Projective<P>
impl<P: Parameters> Mul<<P as ModelParameters>::ScalarField> for Projective<P>
source§fn mul(self, other: P::ScalarField) -> Self
fn mul(self, other: P::ScalarField) -> Self
Performs scalar multiplication of this element.
§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
*
operator.source§impl<P: Parameters> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P>
impl<P: Parameters> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P>
source§fn mul_assign(&mut self, other: P::ScalarField)
fn mul_assign(&mut self, other: P::ScalarField)
Performs scalar multiplication of this element.
source§impl<P: Parameters> Neg for Projective<P>
impl<P: Parameters> Neg for Projective<P>
source§impl<P: Parameters> PartialEq<Affine<P>> for Projective<P>
impl<P: Parameters> PartialEq<Affine<P>> for Projective<P>
source§impl<P: Parameters> PartialEq<Projective<P>> for Affine<P>
impl<P: Parameters> PartialEq<Projective<P>> for Affine<P>
source§fn eq(&self, other: &Projective<P>) -> bool
fn eq(&self, other: &Projective<P>) -> bool
source§impl<P: Parameters> PartialEq<Projective<P>> for Projective<P>
impl<P: Parameters> PartialEq<Projective<P>> for Projective<P>
source§impl<P: Parameters> ProjectiveCurve for Projective<P>
impl<P: Parameters> ProjectiveCurve for Projective<P>
source§fn batch_normalization(v: &mut [Self])
fn batch_normalization(v: &mut [Self])
TODO (howardwu): This method can likely be sped up.
type Affine = Affine<P>
type BaseField = <P as ModelParameters>::BaseField
type ScalarField = <P as ModelParameters>::ScalarField
source§fn prime_subgroup_generator() -> Self
fn prime_subgroup_generator() -> Self
Returns a fixed generator of unknown exponent.
source§fn is_normalized(&self) -> bool
fn is_normalized(&self) -> bool
Checks if the point is already “normalized” so that
cheap affine conversion is possible. Read more
source§fn add_assign_mixed(&mut self, other: &Self::Affine)
fn add_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.
source§fn double_in_place(&mut self)
fn double_in_place(&mut self)
Sets
self := self + self
.source§fn batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine>
fn batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine>
Normalizes a slice of projective elements and outputs a vector
containing the affine equivalents. Read more
source§fn sub_assign_mixed(&mut self, other: &Self::Affine)
fn sub_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.
source§impl<P: Parameters> Sub<&&Projective<P>> for Projective<P>
impl<P: Parameters> Sub<&&Projective<P>> for Projective<P>
source§impl<'a, P: Parameters> Sub<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> Sub<&'a Projective<P>> for Projective<P>
source§impl<'a, P: Parameters> Sub<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> Sub<&'a mut Projective<P>> for Projective<P>
source§impl<P: Parameters> Sub<Projective<P>> for Projective<P>
impl<P: Parameters> Sub<Projective<P>> for Projective<P>
source§impl<P: Parameters> SubAssign<&&Projective<P>> for Projective<P>
impl<P: Parameters> SubAssign<&&Projective<P>> for Projective<P>
source§fn sub_assign(&mut self, other: &&Self)
fn sub_assign(&mut self, other: &&Self)
Performs the
-=
operation. Read moresource§impl<'a, P: Parameters> SubAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> SubAssign<&'a Projective<P>> for Projective<P>
source§fn sub_assign(&mut self, other: &'a Self)
fn sub_assign(&mut self, other: &'a Self)
Performs the
-=
operation. Read moresource§impl<'a, P: Parameters> SubAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> SubAssign<&'a mut Projective<P>> for Projective<P>
source§fn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the
-=
operation. Read moresource§impl<P: Parameters> SubAssign<Projective<P>> for Projective<P>
impl<P: Parameters> SubAssign<Projective<P>> for Projective<P>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read more