Struct snarkvm_curves::templates::twisted_edwards_extended::GroupProjective[][src]

pub struct GroupProjective<P: Parameters> {
    pub x: P::BaseField,
    pub y: P::BaseField,
    pub t: P::BaseField,
    pub z: P::BaseField,
    // some fields omitted
}

Fields

x: P::BaseFieldy: P::BaseFieldt: P::BaseFieldz: P::BaseField

Implementations

impl<P: Parameters> GroupProjective<P>[src]

pub fn new(
    x: P::BaseField,
    y: P::BaseField,
    t: P::BaseField,
    z: P::BaseField
) -> Self
[src]

Trait Implementations

impl<'a, P: Parameters> Add<&'a GroupProjective<P>> for GroupProjective<P>[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, other: &'a Self) -> Self[src]

Performs the + operation. Read more

impl<'a, P: Parameters> AddAssign<&'a GroupProjective<P>> for GroupProjective<P>[src]

fn add_assign(&mut self, other: &'a Self)[src]

Performs the += operation. Read more

impl<P: Parameters> CanonicalDeserialize for GroupProjective<P>[src]

fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>[src]

Reads Self from reader.

fn deserialize_uncompressed<R: Read>(
    reader: &mut R
) -> Result<Self, SerializationError>
[src]

Reads Self from reader without compression.

impl<P: Parameters> CanonicalSerialize for GroupProjective<P>[src]

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>[src]

Serializes self into writer.

fn serialize_uncompressed<W: Write>(
    &self,
    writer: &mut W
) -> Result<(), SerializationError>
[src]

Serializes self into writer without compression.

fn serialized_size(&self) -> usize[src]

fn uncompressed_size(&self) -> usize[src]

impl<P: Parameters> Clone for GroupProjective<P> where
    P: Parameters
[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<P: Parameters> ConstantSerializedSize for GroupProjective<P>[src]

impl<P: Parameters> Debug for GroupProjective<P> where
    P: Parameters
[src]

fn fmt(&self, __f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<P: Parameters> Default for GroupProjective<P>[src]

fn default() -> Self[src]

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

impl<P: Parameters> Display for GroupProjective<P>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult[src]

Formats the value using the given formatter. Read more

impl<P: Parameters> From<GroupAffine<P>> for GroupProjective<P>[src]

fn from(p: GroupAffine<P>) -> GroupProjective<P>[src]

Performs the conversion.

impl<P: Parameters> From<GroupProjective<P>> for GroupAffine<P>[src]

fn from(p: GroupProjective<P>) -> GroupAffine<P>[src]

Performs the conversion.

impl<P: Parameters> FromBytes for GroupProjective<P>[src]

fn read<R: Read>(reader: R) -> IoResult<Self>[src]

Reads Self from reader.

impl<P: Parameters> Hash for GroupProjective<P> where
    P: Parameters
[src]

fn hash<__HP>(&self, __state: &mut __HP) where
    __HP: Hasher
[src]

Feeds this value into the given Hasher. Read more

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

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

impl<'a, P: Parameters> Mul<&'a <P as ModelParameters>::ScalarField> for GroupProjective<P>[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, other: &'a P::ScalarField) -> Self[src]

Performs the * operation. Read more

impl<'a, P: Parameters> MulAssign<&'a <P as ModelParameters>::ScalarField> for GroupProjective<P>[src]

fn mul_assign(&mut self, other: &'a P::ScalarField)[src]

Performs the *= operation. Read more

impl<P: Parameters> Neg for GroupProjective<P>[src]

type Output = Self

The resulting type after applying the - operator.

fn neg(self) -> Self[src]

Performs the unary - operation. Read more

impl<P: Parameters> PartialEq<GroupProjective<P>> for GroupProjective<P>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<P: Parameters> ProjectiveCurve for GroupProjective<P>[src]

type Affine = GroupAffine<P>

type BaseField = P::BaseField

type ScalarField = P::ScalarField

fn prime_subgroup_generator() -> Self[src]

Returns a fixed generator of unknown exponent.

fn is_normalized(&self) -> bool[src]

Checks if the point is already “normalized” so that cheap affine conversion is possible. Read more

fn batch_normalization(v: &mut [Self])[src]

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

fn double_in_place(&mut self) -> &mut Self[src]

fn add_assign_mixed(&mut self, other: &Self::Affine)[src]

Adds an affine element to this element.

fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
    &mut self,
    other: S
)
[src]

Performs scalar multiplication of this element.

fn into_affine(&self) -> GroupAffine<P>[src]

Converts this element into its affine representation.

fn recommended_wnaf_for_scalar(
    scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]

Recommends a wNAF window table size given a scalar. Always returns a number between 2 and 22, inclusive. Read more

fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize[src]

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

fn batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine>[src]

Normalizes a slice of projective elements and outputs a vector containing the affine equivalents. Read more

#[must_use]
fn double(&self) -> Self
[src]

Doubles this element.

impl<'a, P: Parameters> Sub<&'a GroupProjective<P>> for GroupProjective<P>[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, other: &'a Self) -> Self[src]

Performs the - operation. Read more

impl<'a, P: Parameters> SubAssign<&'a GroupProjective<P>> for GroupProjective<P>[src]

fn sub_assign(&mut self, other: &'a Self)[src]

Performs the -= operation. Read more

impl<P: Parameters> ToBytes for GroupProjective<P>[src]

fn write<W: Write>(&self, writer: W) -> IoResult<()>[src]

Serializes self into writer.

impl<M: TEModelParameters, F: Field> ToConstraintField<F> for TEProjective<M> where
    M::BaseField: ToConstraintField<F>, 
[src]

impl<P: Parameters> Zero for GroupProjective<P>[src]

fn zero() -> Self[src]

fn is_zero(&self) -> bool[src]

impl<P: Parameters> Copy for GroupProjective<P> where
    P: Parameters
[src]

impl<P: Parameters> Eq for GroupProjective<P> where
    P: Parameters
[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for GroupProjective<P> where
    P: RefUnwindSafe,
    <P as ModelParameters>::BaseField: RefUnwindSafe

impl<P> Send for GroupProjective<P>

impl<P> Sync for GroupProjective<P>

impl<P> Unpin for GroupProjective<P> where
    P: Unpin,
    <P as ModelParameters>::BaseField: Unpin

impl<P> UnwindSafe for GroupProjective<P> where
    P: UnwindSafe,
    <P as ModelParameters>::BaseField: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<C> Group for C where
    C: ProjectiveCurve
[src]

type ScalarField = <C as ProjectiveCurve>::ScalarField

#[must_use]
pub fn double(&Self) -> C
[src]

Returns self + self.

pub fn double_in_place(&mut Self) -> &mut C[src]

Sets self := self + self.

#[must_use]
fn mul(&self, other: &Self::ScalarField) -> Self
[src]

fn mul_assign(&mut self, other: &Self::ScalarField)[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> UniformRand for T where
    Standard: Distribution<T>, 
[src]

pub fn rand<R>(rng: &mut R) -> T where
    R: Rng + ?Sized
[src]

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

pub fn vzip(self) -> V