Struct pairing::bls12_381::Fq2
[−]
[src]
pub struct Fq2 { pub c0: Fq, pub c1: Fq, }
An element of Fq2, represented by c0 + c1 * u.
Fields
c0: Fq
c1: Fq
Methods
impl Fq2
[src]
fn mul_by_nonresidue(&mut self)
Multiply this element by the cubic and quadratic nonresidue 1 + u.
Trait Implementations
impl Copy for Fq2
[src]
impl Clone for Fq2
[src]
fn clone(&self) -> Fq2
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Fq2
[src]
impl Eq for Fq2
[src]
impl PartialEq for Fq2
[src]
fn eq(&self, __arg_0: &Fq2) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fq2) -> bool
This method tests for !=
.
impl Display for Fq2
[src]
impl Ord for Fq2
[src]
Fq2
elements are ordered lexicographically.
fn cmp(&self, other: &Fq2) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl PartialOrd for Fq2
[src]
fn partial_cmp(&self, other: &Fq2) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Rand for Fq2
[src]
fn rand<R: Rng>(rng: &mut R) -> Self
Generates a random instance of this type using the specified source of randomness. Read more
impl Field for Fq2
[src]
fn zero() -> Self
Returns the zero element of the field, the additive identity.
fn one() -> Self
Returns the one element of the field, the multiplicative identity.
fn is_zero(&self) -> bool
Returns true iff this element is zero.
fn square(&mut self)
Squares this element.
fn double(&mut self)
Doubles this element.
fn negate(&mut self)
Negates this element.
fn add_assign(&mut self, other: &Self)
Adds another element to this element.
fn sub_assign(&mut self, other: &Self)
Subtracts another element from this element.
fn mul_assign(&mut self, other: &Self)
Multiplies another element by this element.
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of this element, if nonzero.
fn frobenius_map(&mut self, power: usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self
Exponentiates this element by a number represented with u64
limbs, least significant digit first. Read more