pub struct Degree2ExtensionField;
Implementations§
Trait Implementations§
Source§impl Clone for Degree2ExtensionField
impl Clone for Degree2ExtensionField
Source§fn clone(&self) -> Degree2ExtensionField
fn clone(&self) -> Degree2ExtensionField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Degree2ExtensionField
impl Debug for Degree2ExtensionField
Source§impl IsFFTField for Degree2ExtensionField
impl IsFFTField for Degree2ExtensionField
const TWO_ADICITY: u64 = 31u64
const TWO_ADIC_PRIMITVE_ROOT_OF_UNITY: Self::BaseType
Source§fn field_name() -> &'static str
fn field_name() -> &'static str
Used for searching this field’s implementation in other languages, e.g in MSL
for executing parallel operations with the Metal API.
Source§fn get_primitive_root_of_unity(
order: u64,
) -> Result<FieldElement<Self>, FieldError>
fn get_primitive_root_of_unity( order: u64, ) -> Result<FieldElement<Self>, FieldError>
Returns a primitive root of unity of order $2^{order}$.
This is an element w such that w^{2^order} = 1 modulo p and
w^k <> 1 modulo p for k not congruent to 2^order
Source§impl IsField for Degree2ExtensionField
impl IsField for Degree2ExtensionField
Source§fn add(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
fn add(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
Returns the component wise addition of a
and b
Source§fn mul(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
fn mul(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
Returns the multiplication of a
and b
.
Source§fn sub(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
fn sub(a: &Self::BaseType, b: &Self::BaseType) -> Self::BaseType
Returns the component wise subtraction of a
and b
Source§fn inv(a: &Self::BaseType) -> Result<Self::BaseType, FieldError>
fn inv(a: &Self::BaseType) -> Result<Self::BaseType, FieldError>
Returns the multiplicative inverse of a
Source§fn div(
a: &Self::BaseType,
b: &Self::BaseType,
) -> Result<Self::BaseType, FieldError>
fn div( a: &Self::BaseType, b: &Self::BaseType, ) -> Result<Self::BaseType, FieldError>
Returns the division of a
and b
Source§fn eq(a: &Self::BaseType, b: &Self::BaseType) -> bool
fn eq(a: &Self::BaseType, b: &Self::BaseType) -> bool
Returns a boolean indicating whether a
and b
are equal component wise.
Source§fn from_u64(x: u64) -> Self::BaseType
fn from_u64(x: u64) -> Self::BaseType
Returns the element x * 1
where 1 is the multiplicative neutral element.
Source§fn from_base_type(x: Self::BaseType) -> Self::BaseType
fn from_base_type(x: Self::BaseType) -> Self::BaseType
Takes as input an element of BaseType and returns the internal representation of that element in the field. Note: for this case this is simply the identity, because the components already have correct representations.
Source§type BaseType = [FieldElement<Mersenne31Field>; 2]
type BaseType = [FieldElement<Mersenne31Field>; 2]
The underlying base type for representing elements from the field.
Source§impl IsSubFieldOf<Degree2ExtensionField> for Mersenne31Field
impl IsSubFieldOf<Degree2ExtensionField> for Mersenne31Field
fn add( a: &Self::BaseType, b: &<Degree2ExtensionField as IsField>::BaseType, ) -> <Degree2ExtensionField as IsField>::BaseType
fn sub( a: &Self::BaseType, b: &<Degree2ExtensionField as IsField>::BaseType, ) -> <Degree2ExtensionField as IsField>::BaseType
fn mul( a: &Self::BaseType, b: &<Degree2ExtensionField as IsField>::BaseType, ) -> <Degree2ExtensionField as IsField>::BaseType
fn div( a: &Self::BaseType, b: &<Degree2ExtensionField as IsField>::BaseType, ) -> Result<<Degree2ExtensionField as IsField>::BaseType, FieldError>
fn embed(a: Self::BaseType) -> <Degree2ExtensionField as IsField>::BaseType
fn to_subfield_vec( b: <Degree2ExtensionField as IsField>::BaseType, ) -> Vec<Self::BaseType>
Auto Trait Implementations§
impl Freeze for Degree2ExtensionField
impl RefUnwindSafe for Degree2ExtensionField
impl Send for Degree2ExtensionField
impl Sync for Degree2ExtensionField
impl Unpin for Degree2ExtensionField
impl UnwindSafe for Degree2ExtensionField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more