Struct snarkvm_fields::Fp2[][src]

pub struct Fp2<P: Fp2Parameters> {
    pub c0: P::Fp,
    pub c1: P::Fp,
    // some fields omitted
}

Fields

c0: P::Fpc1: P::Fp

Implementations

impl<P: Fp2Parameters> Fp2<P>[src]

pub fn new(c0: P::Fp, c1: P::Fp) -> Self[src]

pub fn norm(&self) -> P::Fp[src]

Norm of Fp2 over Fp: Norm(a) = a.x^2 - beta * a.y^2

pub fn mul_by_fp(&mut self, element: &P::Fp)[src]

Trait Implementations

impl<'a, P: Fp2Parameters> Add<&'a Fp2<P>> for Fp2<P>[src]

type Output = Self

The resulting type after applying the + operator.

impl<'a, P: Fp2Parameters> AddAssign<&'a Fp2<P>> for Fp2<P>[src]

impl<P: Fp2Parameters> CanonicalDeserialize for Fp2<P>[src]

impl<P: Fp2Parameters> CanonicalDeserializeWithFlags for Fp2<P>[src]

impl<P: Fp2Parameters> CanonicalSerialize for Fp2<P>[src]

impl<P: Fp2Parameters> CanonicalSerializeWithFlags for Fp2<P>[src]

impl<P: Fp2Parameters> Clone for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P: Fp2Parameters> ConstantSerializedSize for Fp2<P>[src]

impl<P: Fp2Parameters> Copy for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P: Fp2Parameters> Debug for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P: Fp2Parameters> Default for Fp2<P> where
    P: Fp2Parameters
[src]

impl<'de, P: Fp2Parameters> Deserialize<'de> for Fp2<P> where
    P::Fp: Deserialize<'de>,
    P::Fp: Deserialize<'de>, 
[src]

impl<P: Fp2Parameters> Display for Fp2<P>[src]

impl<'a, P: Fp2Parameters> Div<&'a Fp2<P>> for Fp2<P>[src]

type Output = Self

The resulting type after applying the / operator.

impl<'a, P: Fp2Parameters> DivAssign<&'a Fp2<P>> for Fp2<P>[src]

impl<P: Fp2Parameters> Eq for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P: Fp2Parameters> Field for Fp2<P>[src]

impl<P: Fp2Parameters> From<u128> for Fp2<P>[src]

impl<P: Fp2Parameters> From<u16> for Fp2<P>[src]

impl<P: Fp2Parameters> From<u32> for Fp2<P>[src]

impl<P: Fp2Parameters> From<u64> for Fp2<P>[src]

impl<P: Fp2Parameters> From<u8> for Fp2<P>[src]

impl<P: Fp2Parameters> FromBytes for Fp2<P>[src]

impl<P: Fp2Parameters> Hash for Fp2<P> where
    P: Fp2Parameters
[src]

impl<'a, P: Fp2Parameters> Mul<&'a Fp2<P>> for Fp2<P>[src]

type Output = Self

The resulting type after applying the * operator.

impl<'a, P: Fp2Parameters> MulAssign<&'a Fp2<P>> for Fp2<P>[src]

impl<P: Fp2Parameters> Neg for Fp2<P>[src]

type Output = Self

The resulting type after applying the - operator.

impl<P: Fp2Parameters> One for Fp2<P>[src]

impl<P: Fp2Parameters> Ord for Fp2<P>[src]

Fp2 elements are ordered lexicographically.

impl<P: Fp2Parameters> PartialEq<Fp2<P>> for Fp2<P> where
    P: Fp2Parameters
[src]

impl<P: Fp2Parameters> PartialOrd<Fp2<P>> for Fp2<P>[src]

impl<P: Fp2Parameters> Serialize for Fp2<P> where
    P::Fp: Serialize,
    P::Fp: Serialize
[src]

impl<'a, P: Fp2Parameters> SquareRootField for Fp2<P> where
    P::Fp: SquareRootField
[src]

impl<'a, P: Fp2Parameters> Sub<&'a Fp2<P>> for Fp2<P>[src]

type Output = Self

The resulting type after applying the - operator.

impl<'a, P: Fp2Parameters> SubAssign<&'a Fp2<P>> for Fp2<P>[src]

impl<P: Fp2Parameters> ToBytes for Fp2<P>[src]

impl<P: Fp2Parameters> ToConstraintField<<P as Fp2Parameters>::Fp> for Fp2<P>[src]

impl<P: Fp2Parameters> Zero for Fp2<P>[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for Fp2<P> where
    P: RefUnwindSafe,
    <P as Fp2Parameters>::Fp: RefUnwindSafe

impl<P> Send for Fp2<P>

impl<P> Sync for Fp2<P>

impl<P> Unpin for Fp2<P> where
    P: Unpin,
    <P as Fp2Parameters>::Fp: Unpin

impl<P> UnwindSafe for Fp2<P> where
    P: UnwindSafe,
    <P as Fp2Parameters>::Fp: UnwindSafe

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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.

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

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