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
sourceimpl<P: Parameters> Projective<P>
impl<P: Parameters> Projective<P>
Trait Implementations
sourceimpl<P: Parameters> Add<&'_ &'_ Projective<P>> for Projective<P>
impl<P: Parameters> Add<&'_ &'_ Projective<P>> for Projective<P>
sourceimpl<'a, P: Parameters> Add<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> Add<&'a Projective<P>> for Projective<P>
sourceimpl<'a, P: Parameters> Add<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> Add<&'a mut Projective<P>> for Projective<P>
sourceimpl<P: Parameters> Add<Projective<P>> for Projective<P>
impl<P: Parameters> Add<Projective<P>> for Projective<P>
sourceimpl<P: Parameters> AddAssign<&'_ &'_ Projective<P>> for Projective<P>
impl<P: Parameters> AddAssign<&'_ &'_ Projective<P>> for Projective<P>
sourcefn add_assign(&mut self, other: &&Self)
fn add_assign(&mut self, other: &&Self)
Performs the +=
operation. Read more
sourceimpl<'a, P: Parameters> AddAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> AddAssign<&'a Projective<P>> for Projective<P>
sourcefn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the +=
operation. Read more
sourceimpl<'a, P: Parameters> AddAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> AddAssign<&'a mut Projective<P>> for Projective<P>
sourcefn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the +=
operation. Read more
sourceimpl<P: Parameters> AddAssign<Projective<P>> for Projective<P>
impl<P: Parameters> AddAssign<Projective<P>> for Projective<P>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the +=
operation. Read more
sourceimpl<P: Parameters> CanonicalDeserialize for Projective<P>
impl<P: Parameters> CanonicalDeserialize for Projective<P>
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
Reads Self
from reader
.
sourcefn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
fn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
Reads Self
from reader
without compression.
sourceimpl<P: Parameters> CanonicalSerialize for Projective<P>
impl<P: Parameters> CanonicalSerialize for Projective<P>
sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
Serializes self
into writer
.
sourcefn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
fn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
Serializes self
into writer
without compression.
fn serialized_size(&self) -> usize
fn uncompressed_size(&self) -> usize
sourceimpl<P: Parameters> Clone for Projective<P> where
P: Parameters,
impl<P: Parameters> Clone for Projective<P> where
P: Parameters,
sourceimpl<P: Parameters> ConstantSerializedSize for Projective<P>
impl<P: Parameters> ConstantSerializedSize for Projective<P>
const SERIALIZED_SIZE: usize
const UNCOMPRESSED_SIZE: usize
sourceimpl<P: Parameters> Debug for Projective<P> where
P: Parameters,
impl<P: Parameters> Debug for Projective<P> where
P: Parameters,
sourceimpl<P: Parameters> Default for Projective<P>
impl<P: Parameters> Default for Projective<P>
sourceimpl<P: Parameters> Display for Projective<P>
impl<P: Parameters> Display for Projective<P>
sourceimpl<P: Parameters> Distribution<Projective<P>> for Standard
impl<P: Parameters> Distribution<Projective<P>> for Standard
sourcefn 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.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<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.
sourcefn from(p: Affine<P>) -> Projective<P>
fn from(p: Affine<P>) -> Projective<P>
Performs the conversion.
sourceimpl<P: Parameters> From<Projective<P>> for Affine<P>
impl<P: Parameters> From<Projective<P>> for Affine<P>
sourcefn from(p: Projective<P>) -> Affine<P>
fn from(p: Projective<P>) -> Affine<P>
Performs the conversion.
sourceimpl<P: Parameters> FromBytes for Projective<P>
impl<P: Parameters> FromBytes for Projective<P>
sourceimpl<P: Parameters> Group for Projective<P>
impl<P: Parameters> Group for Projective<P>
type ScalarField = P::ScalarField
sourcefn double_in_place(&mut self)
fn double_in_place(&mut self)
Sets self := self + self
.
sourceimpl<P: Parameters> Hash for Projective<P> where
P: Parameters,
impl<P: Parameters> Hash for Projective<P> where
P: Parameters,
sourceimpl<P: Parameters> Mul<<P as ModelParameters>::ScalarField> for Projective<P>
impl<P: Parameters> Mul<<P as ModelParameters>::ScalarField> for Projective<P>
sourcefn mul(self, other: P::ScalarField) -> Self
fn mul(self, other: P::ScalarField) -> Self
Performs scalar multiplication of this element.
type Output = Self
type Output = Self
The resulting type after applying the *
operator.
sourceimpl<P: Parameters> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P>
impl<P: Parameters> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P>
sourcefn mul_assign(&mut self, other: P::ScalarField)
fn mul_assign(&mut self, other: P::ScalarField)
Performs scalar multiplication of this element.
sourceimpl<P: Parameters> Neg for Projective<P>
impl<P: Parameters> Neg for Projective<P>
sourceimpl<P: Parameters> PartialEq<Projective<P>> for Projective<P>
impl<P: Parameters> PartialEq<Projective<P>> for Projective<P>
sourceimpl<P: Parameters> ProjectiveCurve for Projective<P>
impl<P: Parameters> ProjectiveCurve for Projective<P>
sourcefn 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::BaseField
sourcefn prime_subgroup_generator() -> Self
fn prime_subgroup_generator() -> Self
Returns a fixed generator of unknown exponent.
sourcefn 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
sourcefn add_assign_mixed(&mut self, other: &Self::Affine)
fn add_assign_mixed(&mut self, other: &Self::Affine)
Adds an affine element to this element.
sourcefn into_affine(&self) -> Affine<P>
fn into_affine(&self) -> Affine<P>
Converts this element into its affine representation.
sourcefn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
Recommends a wNAF window table size given a scalar. Always returns a number between 2 and 22, inclusive. Read more
sourcefn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
Recommends a wNAF window size given the number of scalars you intend to multiply a base by. Always returns a number between 2 and 22, inclusive. Read more
sourceimpl<P: Parameters> Sub<&'_ &'_ Projective<P>> for Projective<P>
impl<P: Parameters> Sub<&'_ &'_ Projective<P>> for Projective<P>
sourceimpl<'a, P: Parameters> Sub<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> Sub<&'a Projective<P>> for Projective<P>
sourceimpl<'a, P: Parameters> Sub<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> Sub<&'a mut Projective<P>> for Projective<P>
sourceimpl<P: Parameters> Sub<Projective<P>> for Projective<P>
impl<P: Parameters> Sub<Projective<P>> for Projective<P>
sourceimpl<P: Parameters> SubAssign<&'_ &'_ Projective<P>> for Projective<P>
impl<P: Parameters> SubAssign<&'_ &'_ Projective<P>> for Projective<P>
sourcefn sub_assign(&mut self, other: &&Self)
fn sub_assign(&mut self, other: &&Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Parameters> SubAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> SubAssign<&'a Projective<P>> for Projective<P>
sourcefn sub_assign(&mut self, other: &'a Self)
fn sub_assign(&mut self, other: &'a Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Parameters> SubAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: Parameters> SubAssign<&'a mut Projective<P>> for Projective<P>
sourcefn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the -=
operation. Read more
sourceimpl<P: Parameters> SubAssign<Projective<P>> for Projective<P>
impl<P: Parameters> SubAssign<Projective<P>> for Projective<P>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Parameters> Sum<&'a Projective<P>> for Projective<P>
impl<'a, P: Parameters> Sum<&'a Projective<P>> for Projective<P>
sourceimpl<P: Parameters> Sum<Projective<P>> for Projective<P>
impl<P: Parameters> Sum<Projective<P>> for Projective<P>
sourceimpl<P: Parameters> ToBytes for Projective<P>
impl<P: Parameters> ToBytes for Projective<P>
sourceimpl<M: ShortWeierstrassParameters, F: Field> ToConstraintField<F> for SWProjective<M> where
M::BaseField: ToConstraintField<F>,
impl<M: ShortWeierstrassParameters, F: Field> ToConstraintField<F> for SWProjective<M> where
M::BaseField: ToConstraintField<F>,
fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>
sourceimpl<P: Parameters> Zero for Projective<P>
impl<P: Parameters> Zero for Projective<P>
impl<P: Parameters> Copy for Projective<P> where
P: Parameters,
impl<P: Parameters> Eq for Projective<P> where
P: Parameters,
Auto Trait Implementations
impl<P> RefUnwindSafe for Projective<P> where
<P as ModelParameters>::BaseField: RefUnwindSafe,
impl<P> Send for Projective<P>
impl<P> Sync for Projective<P>
impl<P> Unpin for Projective<P> where
<P as ModelParameters>::BaseField: Unpin,
impl<P> UnwindSafe for Projective<P> where
<P as ModelParameters>::BaseField: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more