Skip to main content

CubicExtField

Struct CubicExtField 

Source
pub struct CubicExtField<P: CubicExtConfig> {
    pub c0: P::BaseField,
    pub c1: P::BaseField,
    pub c2: P::BaseField,
}
Expand description

An element of a cubic extension field F_p[X]/(X^3 - P::NONRESIDUE) is represented as c0 + c1 * X + c2 * X^2, for c0, c1, c2 in P::BaseField.

Fields§

§c0: P::BaseField§c1: P::BaseField§c2: P::BaseField

Implementations§

Source§

impl<P: Fp3Config> CubicExtField<Fp3ConfigWrapper<P>>

Source

pub fn mul_assign_by_fp(&mut self, value: &P::Fp)

In-place multiply all coefficients c0, c1, and c2 of self by an element from Fp.

§Examples
use ark_mnt6_753::{Fq as Fp, Fq3 as Fp3};
let c0: Fp = Fp::rand(&mut test_rng());
let c1: Fp = Fp::rand(&mut test_rng());
let c2: Fp = Fp::rand(&mut test_rng());
let mut ext_element: Fp3 = Fp3::new(c0, c1, c2);

let base_field_element: Fp = Fp::rand(&mut test_rng());
ext_element.mul_assign_by_fp(&base_field_element);

assert_eq!(ext_element.c0, c0 * base_field_element);
assert_eq!(ext_element.c1, c1 * base_field_element);
assert_eq!(ext_element.c2, c2 * base_field_element);
Source§

impl<P: Fp6Config> CubicExtField<Fp6ConfigWrapper<P>>

Source

pub fn mul_assign_by_fp2(&mut self, other: Fp2<P::Fp2Config>)

Source

pub fn mul_by_fp(&mut self, element: &<P::Fp2Config as Fp2Config>::Fp)

Source

pub fn mul_by_fp2(&mut self, element: &Fp2<P::Fp2Config>)

Source

pub fn mul_by_1(&mut self, c1: &Fp2<P::Fp2Config>)

Source

pub fn mul_by_01(&mut self, c0: &Fp2<P::Fp2Config>, c1: &Fp2<P::Fp2Config>)

Source§

impl<P: CubicExtConfig> CubicExtField<P>

Source

pub const fn new(c0: P::BaseField, c1: P::BaseField, c2: P::BaseField) -> Self

Create a new field element from coefficients c0, c1 and c2 so that the result is of the form c0 + c1 * X + c2 * X^2.

§Examples
use ark_ff::models::cubic_extension::CubicExtField;

let c0: Fp2 = Fp2::rand(&mut test_rng());
let c1: Fp2 = Fp2::rand(&mut test_rng());
let c2: Fp2 = Fp2::rand(&mut test_rng());
// `Fp6` a degree-3 extension over `Fp2`.
let c: CubicExtField<Config> = Fp6::new(c0, c1, c2);
Source

pub fn mul_assign_by_base_field(&mut self, value: &P::BaseField)

Source

pub fn norm(&self) -> P::BaseField

Calculate the norm of an element with respect to the base field P::BaseField. The norm maps an element a in the extension field Fq^m to an element in the BaseField Fq. Norm(a) = a * a^q * a^(q^2)

Trait Implementations§

Source§

impl<'a, 'b, P: CubicExtConfig> Add<&'a CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a CubicExtField<P>) -> CubicExtField<P>

Performs the + operation. Read more
Source§

impl<P: CubicExtConfig> Add<&CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &Self) -> Self

Performs the + operation. Read more
Source§

impl<'a, 'b, P: CubicExtConfig> Add<&'a mut CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut CubicExtField<P>) -> CubicExtField<P>

Performs the + operation. Read more
Source§

impl<'a, P: CubicExtConfig> Add<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut Self) -> Self

Performs the + operation. Read more
Source§

impl<'b, P: CubicExtConfig> Add<CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: CubicExtField<P>) -> CubicExtField<P>

Performs the + operation. Read more
Source§

impl<P: CubicExtConfig> Add for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl<P: CubicExtConfig> AddAssign<&CubicExtField<P>> for CubicExtField<P>

Source§

fn add_assign(&mut self, other: &Self)

Performs the += operation. Read more
Source§

impl<'a, P: CubicExtConfig> AddAssign<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

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

Performs the += operation. Read more
Source§

impl<P: CubicExtConfig> AddAssign for CubicExtField<P>

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl<P: CubicExtConfig> AdditiveGroup for CubicExtField<P>

Source§

const ZERO: Self

The additive identity of the field.
Source§

type Scalar = CubicExtField<P>

Source§

fn double(&self) -> Self

Doubles self.
Source§

fn double_in_place(&mut self) -> &mut Self

Doubles self in place.
Source§

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.
Source§

impl<P: CubicExtConfig> CanonicalDeserialize for CubicExtField<P>

Source§

fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>

The general deserialize method that takes in customization flags.
Source§

fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Reads Self from reader using the compressed form if applicable. Performs validation if applicable.
Source§

fn deserialize_compressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Reads Self from reader using the compressed form if applicable, without validating the deserialized value. Read more
Source§

fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Reads Self from reader using the uncompressed form. Performs validation if applicable.
Source§

fn deserialize_uncompressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Reads Self from reader using the uncompressed form, without validating the deserialized value. Read more
Source§

impl<P: CubicExtConfig> CanonicalDeserializeWithFlags for CubicExtField<P>

Source§

fn deserialize_with_flags<R: Read, F: Flags>( reader: R, ) -> Result<(Self, F), SerializationError>

Reads Self and Flags from reader. Returns empty flags by default.
Source§

impl<P: CubicExtConfig> CanonicalSerialize for CubicExtField<P>

Source§

fn serialize_with_mode<W: Write>( &self, writer: W, _compress: Compress, ) -> Result<(), SerializationError>

The general serialize method that takes in customization flags.
Source§

fn serialized_size(&self, _compress: Compress) -> usize

Returns the size in bytes of the serialized version of self with the given compression mode.
Source§

fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Serializes self into writer using the compressed form if applicable.
Source§

fn compressed_size(&self) -> usize

Returns the size in bytes of the compressed serialized version of self.
Source§

fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Serializes self into writer using the uncompressed form.
Source§

fn uncompressed_size(&self) -> usize

Returns the size in bytes of the uncompressed serialized version of self.
Source§

impl<P: CubicExtConfig> CanonicalSerializeWithFlags for CubicExtField<P>

Source§

fn serialize_with_flags<W: Write, F: Flags>( &self, writer: W, flags: F, ) -> Result<(), SerializationError>

Serializes self and flags into writer.
Source§

fn serialized_size_with_flags<F: Flags>(&self) -> usize

Serializes self and flags into writer.
Source§

impl<P: CubicExtConfig> Clone for CubicExtField<P>
where P::BaseField: Copy,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P: CubicExtConfig> Debug for CubicExtField<P>
where P::BaseField: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P: CubicExtConfig> Default for CubicExtField<P>
where P::BaseField: Default,

Source§

fn default() -> Self

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

impl<P: CubicExtConfig> Display for CubicExtField<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<P: CubicExtConfig> Distribution<CubicExtField<P>> for Standard

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> CubicExtField<P>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<'a, 'b, P: CubicExtConfig> Div<&'a CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a CubicExtField<P>) -> CubicExtField<P>

Performs the / operation. Read more
Source§

impl<P: CubicExtConfig> Div<&CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: &Self) -> Self

Performs the / operation. Read more
Source§

impl<'a, 'b, P: CubicExtConfig> Div<&'a mut CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a mut CubicExtField<P>) -> CubicExtField<P>

Performs the / operation. Read more
Source§

impl<'a, P: CubicExtConfig> Div<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a mut Self) -> Self

Performs the / operation. Read more
Source§

impl<'b, P: CubicExtConfig> Div<CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: CubicExtField<P>) -> CubicExtField<P>

Performs the / operation. Read more
Source§

impl<P: CubicExtConfig> Div for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the / operator.
Source§

fn div(self, other: Self) -> Self

Performs the / operation. Read more
Source§

impl<P: CubicExtConfig> DivAssign<&CubicExtField<P>> for CubicExtField<P>

Source§

fn div_assign(&mut self, other: &Self)

Performs the /= operation. Read more
Source§

impl<'a, P: CubicExtConfig> DivAssign<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

fn div_assign(&mut self, other: &'a mut Self)

Performs the /= operation. Read more
Source§

impl<P: CubicExtConfig> DivAssign for CubicExtField<P>

Source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
Source§

impl<P: CubicExtConfig> FftField for CubicExtField<P>
where P::BaseField: FftField,

Source§

const GENERATOR: Self

The generator of the multiplicative group of the field
Source§

const TWO_ADICITY: u32 = <P::BaseField>::TWO_ADICITY

Let N be the size of the multiplicative group defined by the field. Then TWO_ADICITY is the two-adicity of N, i.e. the integer s such that N = 2^s * t for some odd integer t.
Source§

const TWO_ADIC_ROOT_OF_UNITY: Self

2^s root of unity computed by GENERATOR^t
Source§

const SMALL_SUBGROUP_BASE: Option<u32> = <P::BaseField>::SMALL_SUBGROUP_BASE

An integer b such that there exists a multiplicative subgroup of size b^k for some integer k.
Source§

const SMALL_SUBGROUP_BASE_ADICITY: Option<u32> = <P::BaseField>::SMALL_SUBGROUP_BASE_ADICITY

The integer k such that there exists a multiplicative subgroup of size Self::SMALL_SUBGROUP_BASE^k.
Source§

const LARGE_SUBGROUP_ROOT_OF_UNITY: Option<Self>

GENERATOR^((MODULUS-1) / (2^s * SMALL_SUBGROUP_BASE^SMALL_SUBGROUP_BASE_ADICITY)) Used for mixed-radix FFT.
Source§

fn get_root_of_unity(n: u64) -> Option<Self>

Returns the root of unity of order n, if one exists. If no small multiplicative subgroup is defined, this is the 2-adic root of unity of order n (for n a power of 2). If a small multiplicative subgroup is defined, this is the root of unity of order n for the larger subgroup generated by FftConfig::LARGE_SUBGROUP_ROOT_OF_UNITY (for n = 2^i * FftConfig::SMALL_SUBGROUP_BASE^j for some i, j).
Source§

fn get_root_of_unity_big_int(n: BigUint) -> Option<Self>

Returns the root of unity of order n, if one exists. If no small multiplicative subgroup is defined, this is the 2-adic root of unity of order n (for n a power of 2). If a small multiplicative subgroup is defined, this is the root of unity of order n for the larger subgroup generated by FftConfig::LARGE_SUBGROUP_ROOT_OF_UNITY (for n = 2^i * FftConfig::SMALL_SUBGROUP_BASE^j for some i, j).
Source§

impl<P: CubicExtConfig> Field for CubicExtField<P>

Source§

fn legendre(&self) -> LegendreSymbol

Returns the Legendre symbol.

Source§

const SQRT_PRECOMP: Option<SqrtPrecomputation<Self>> = P::SQRT_PRECOMP

Determines the algorithm for computing square roots.
Source§

const ONE: Self

The multiplicative identity of the field.
Source§

const NEG_ONE: Self

Negation of the multiplicative identity of the field.
Source§

type BasePrimeField = <P as CubicExtConfig>::BasePrimeField

Source§

fn extension_degree() -> u64

Returns the extension degree of this field with respect to Self::BasePrimeField.
Source§

fn from_base_prime_field(elem: Self::BasePrimeField) -> Self

Constructs a field element from a single base prime field elements. Read more
Source§

fn to_base_prime_field_elements( &self, ) -> impl Iterator<Item = Self::BasePrimeField>

Source§

fn from_base_prime_field_elems( elems: impl IntoIterator<Item = Self::BasePrimeField>, ) -> Option<Self>

Convert a slice of base prime field elements into a field element. If the slice length != Self::extension_degree(), must return None.
Source§

fn from_random_bytes_with_flags<F: Flags>(bytes: &[u8]) -> Option<(Self, F)>

Attempt to deserialize a field element, splitting the bitflags metadata according to F specification. Returns None if the deserialization fails. Read more
Source§

fn from_random_bytes(bytes: &[u8]) -> Option<Self>

Attempt to deserialize a field element. Returns None if the deserialization fails. Read more
Source§

fn square(&self) -> Self

Returns self * self.
Source§

fn square_in_place(&mut self) -> &mut Self

Squares self in place.
Source§

fn inverse(&self) -> Option<Self>

Computes the multiplicative inverse of self if self is nonzero.
Source§

fn inverse_in_place(&mut self) -> Option<&mut Self>

If self.inverse().is_none(), this just returns None. Otherwise, it sets self to self.inverse().unwrap().
Source§

fn frobenius_map_in_place(&mut self, power: usize)

Sets self to self^s, where s = Self::BasePrimeField::MODULUS^power. This is also called the Frobenius automorphism.
Source§

fn mul_by_base_prime_field(&self, elem: &Self::BasePrimeField) -> Self

Source§

fn characteristic() -> &'static [u64]

Returns the characteristic of the field, in little-endian representation.
Source§

fn sqrt(&self) -> Option<Self>

Returns the square root of self, if it exists.
Source§

fn sqrt_in_place(&mut self) -> Option<&mut Self>

Sets self to be the square root of self, if it exists.
Source§

fn sum_of_products<const T: usize>(a: &[Self; T], b: &[Self; T]) -> Self

Returns sum([a_i * b_i]).
Source§

fn frobenius_map(&self, power: usize) -> Self

Returns self^s, where s = Self::BasePrimeField::MODULUS^power. This is also called the Frobenius automorphism.
Source§

fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self

Returns self^exp, where exp is an integer represented with u64 limbs, least significant limb first.
Source§

fn pow_with_table<S: AsRef<[u64]>>(powers_of_2: &[Self], exp: S) -> Option<Self>

Exponentiates a field element f by a number represented with u64 limbs, using a precomputed table containing as many powers of 2 of f as the 1 + the floor of log2 of the exponent exp, starting from the 1st power. That is, powers_of_2 should equal &[p, p^2, p^4, ..., p^(2^n)] when exp has at most n bits. Read more
Source§

impl<P: CubicExtConfig> From<bool> for CubicExtField<P>

Source§

fn from(other: bool) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<i128> for CubicExtField<P>

Source§

fn from(val: i128) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<i16> for CubicExtField<P>

Source§

fn from(val: i16) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<i32> for CubicExtField<P>

Source§

fn from(val: i32) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<i64> for CubicExtField<P>

Source§

fn from(val: i64) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<i8> for CubicExtField<P>

Source§

fn from(val: i8) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<u128> for CubicExtField<P>

Source§

fn from(other: u128) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<u16> for CubicExtField<P>

Source§

fn from(other: u16) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<u32> for CubicExtField<P>

Source§

fn from(other: u32) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<u64> for CubicExtField<P>

Source§

fn from(other: u64) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> From<u8> for CubicExtField<P>

Source§

fn from(other: u8) -> Self

Converts to this type from the input type.
Source§

impl<P: CubicExtConfig> Hash for CubicExtField<P>
where P::BaseField: Hash,

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

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

impl<'a, 'b, P: CubicExtConfig> Mul<&'a CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a CubicExtField<P>) -> CubicExtField<P>

Performs the * operation. Read more
Source§

impl<P: CubicExtConfig> Mul<&CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Self) -> Self

Performs the * operation. Read more
Source§

impl<'a, 'b, P: CubicExtConfig> Mul<&'a mut CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a mut CubicExtField<P>) -> CubicExtField<P>

Performs the * operation. Read more
Source§

impl<'a, P: CubicExtConfig> Mul<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a mut Self) -> Self

Performs the * operation. Read more
Source§

impl<'b, P: CubicExtConfig> Mul<CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: CubicExtField<P>) -> CubicExtField<P>

Performs the * operation. Read more
Source§

impl<P: CubicExtConfig> Mul for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Self) -> Self

Performs the * operation. Read more
Source§

impl<P: CubicExtConfig> MulAssign<&CubicExtField<P>> for CubicExtField<P>

Source§

fn mul_assign(&mut self, other: &Self)

Performs the *= operation. Read more
Source§

impl<'a, P: CubicExtConfig> MulAssign<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

fn mul_assign(&mut self, other: &'a mut Self)

Performs the *= operation. Read more
Source§

impl<P: CubicExtConfig> MulAssign for CubicExtField<P>

Source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
Source§

impl<P: CubicExtConfig> Neg for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<P: CubicExtConfig> One for CubicExtField<P>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl<P: CubicExtConfig> Ord for CubicExtField<P>

CubicExtField elements are ordered lexicographically.

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<P: CubicExtConfig> PartialEq for CubicExtField<P>
where P::BaseField: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P: CubicExtConfig> PartialOrd for CubicExtField<P>

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, P: CubicExtConfig> Product<&'a CubicExtField<P>> for CubicExtField<P>

Source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<P: CubicExtConfig> Product for CubicExtField<P>

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<'a, 'b, P: CubicExtConfig> Sub<&'a CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a CubicExtField<P>) -> CubicExtField<P>

Performs the - operation. Read more
Source§

impl<P: CubicExtConfig> Sub<&CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Self) -> Self

Performs the - operation. Read more
Source§

impl<'a, 'b, P: CubicExtConfig> Sub<&'a mut CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut CubicExtField<P>) -> CubicExtField<P>

Performs the - operation. Read more
Source§

impl<'a, P: CubicExtConfig> Sub<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut Self) -> Self

Performs the - operation. Read more
Source§

impl<'b, P: CubicExtConfig> Sub<CubicExtField<P>> for &'b CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: CubicExtField<P>) -> CubicExtField<P>

Performs the - operation. Read more
Source§

impl<P: CubicExtConfig> Sub for CubicExtField<P>

Source§

type Output = CubicExtField<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
Source§

impl<P: CubicExtConfig> SubAssign<&CubicExtField<P>> for CubicExtField<P>

Source§

fn sub_assign(&mut self, other: &Self)

Performs the -= operation. Read more
Source§

impl<'a, P: CubicExtConfig> SubAssign<&'a mut CubicExtField<P>> for CubicExtField<P>

Source§

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

Performs the -= operation. Read more
Source§

impl<P: CubicExtConfig> SubAssign for CubicExtField<P>

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl<'a, P: CubicExtConfig> Sum<&'a CubicExtField<P>> for CubicExtField<P>

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P: CubicExtConfig> Sum for CubicExtField<P>

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P: CubicExtConfig> ToConstraintField<<P as CubicExtConfig>::BasePrimeField> for CubicExtField<P>

Source§

impl<P: CubicExtConfig> Valid for CubicExtField<P>

Source§

const TRIVIAL_CHECK: bool

Whether the check method is trivial (i.e. always returns Ok(())). If this is true, the batch_check method will skip all checks and return Ok(()). This should be set to true for types where check is trivial, e.g. integers, field elements, etc. This is false by default. This is primarily an optimization to skip unnecessary checks in batch_check.
Source§

fn check(&self) -> Result<(), SerializationError>

Checks whether self is valid. If self is valid, returns Ok(()). Otherwise, returns an error describing the failure. This method is called by deserialize_with_mode if validate is Validate::Yes.
Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Checks whether all items in batch are valid. If all items are valid, returns Ok(()). Otherwise, returns an error describing the first failure.
Source§

impl<P: CubicExtConfig> Zero for CubicExtField<P>

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<P: CubicExtConfig> Zeroize for CubicExtField<P>

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl<P: CubicExtConfig> Copy for CubicExtField<P>
where P::BaseField: Copy,

Source§

impl<P: CubicExtConfig> Eq for CubicExtField<P>
where P::BaseField: PartialEq,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CanonicalSerializeHashExt for T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> UniformRand for T

Source§

fn rand<R>(rng: &mut R) -> T
where R: Rng + ?Sized,

Source§

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

Source§

fn vzip(self) -> V