Struct lambdaworks_math::field::element::FieldElement
source · pub struct FieldElement<F: IsField> { /* private fields */ }
Expand description
A field element with operations algorithms defined in F
Implementations§
source§impl<F: IsField> FieldElement<F>
impl<F: IsField> FieldElement<F>
pub fn inplace_batch_inverse(numbers: &mut [Self]) -> Result<(), FieldError>
pub fn to_subfield_vec<S>(self) -> Vec<FieldElement<S>>where
S: IsSubFieldOf<F>,
source§impl<F> FieldElement<F>
impl<F> FieldElement<F>
source§impl<F> FieldElement<F>where
F: IsField,
impl<F> FieldElement<F>where
F: IsField,
FieldElement general implementation
Most of this is delegated to the trait F
that
implements the field operations.
sourcepub fn inv(&self) -> Result<Self, FieldError>
pub fn inv(&self) -> Result<Self, FieldError>
Returns the multiplicative inverse of self
sourcepub fn pow<T>(&self, exponent: T) -> Selfwhere
T: IsUnsignedInteger,
pub fn pow<T>(&self, exponent: T) -> Selfwhere
T: IsUnsignedInteger,
Returns self
raised to the power of exponent
pub fn to_extension<L: IsField>(self) -> FieldElement<L>where
F: IsSubFieldOf<L>,
source§impl<F: IsPrimeField> FieldElement<F>
impl<F: IsPrimeField> FieldElement<F>
pub fn representative(&self) -> F::RepresentativeType
pub fn sqrt(&self) -> Option<(Self, Self)>
pub fn legendre_symbol(&self) -> LegendreSymbol
sourcepub fn from_hex(hex_string: &str) -> Result<Self, CreationError>
pub fn from_hex(hex_string: &str) -> Result<Self, CreationError>
Creates a FieldElement
from a hexstring. It can contain 0x
or not.
Returns an CreationError::InvalidHexString
if the value is not a hexstring.
Returns a CreationError::EmptyString
if the input string is empty.
Returns a CreationError::HexStringIsTooBig
if the the input hex string is bigger
than the maximum amount of characters for this element.
source§impl<M, const NUM_LIMBS: usize> FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
impl<M, const NUM_LIMBS: usize> FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
sourcepub const fn from_hex_unchecked(hex: &str) -> Self
pub const fn from_hex_unchecked(hex: &str) -> Self
Creates a FieldElement
from a hexstring. It can contain 0x
or not.
§Panics
Panics if value is not a hexstring
source§impl<F, Q> FieldElement<QuadraticExtensionField<F, Q>>
impl<F, Q> FieldElement<QuadraticExtensionField<F, Q>>
source§impl FieldElement<Babybear31PrimeField>
impl FieldElement<Babybear31PrimeField>
pub fn to_bytes_le(&self) -> [u8; 8]
pub fn to_bytes_be(&self) -> [u8; 8]
source§impl FieldElement<Stark252PrimeField>
impl FieldElement<Stark252PrimeField>
sourcepub fn to_bytes_le(&self) -> [u8; 32]
pub fn to_bytes_le(&self) -> [u8; 32]
No std version of to_bytes_le
from ByteConversion
trait
This follows the convention used by
Starkware and Lambdaclass Cairo VM It’s the same as ByteConversion to_bytes_le.
sourcepub fn to_bits_le(&self) -> [bool; 256]
pub fn to_bits_le(&self) -> [bool; 256]
This follows the convention used by starknet-rs
sourcepub fn to_bytes_be(&self) -> [u8; 32]
pub fn to_bytes_be(&self) -> [u8; 32]
No std version of to_bytes_be
from ByteConversion
trait
This follows the convention used by
Starkware and Lambdaclass Cairo VM It’s the same as ByteConversion to_bytes_be.
source§impl FieldElement<U64GoldilocksPrimeField>
impl FieldElement<U64GoldilocksPrimeField>
pub fn to_bytes_le(&self) -> [u8; 8]
pub fn to_bytes_be(&self) -> [u8; 8]
source§impl FieldElement<Mersenne31MontgomeryPrimeField>
impl FieldElement<Mersenne31MontgomeryPrimeField>
pub fn to_bytes_le(&self) -> [u8; 8]
pub fn to_bytes_be(&self) -> [u8; 8]
source§impl FieldElement<Mersenne31Field>
impl FieldElement<Mersenne31Field>
pub fn to_bytes_le(&self) -> Vec<u8>
pub fn to_bytes_be(&self) -> Vec<u8>
Trait Implementations§
source§impl<F, L> Add<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Add<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
Addition operator overloading for field elements
source§type Output = FieldElement<L>
type Output = FieldElement<L>
+
operator.source§impl<F, L> Add<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Add<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
+
operator.source§impl<F, L> Add<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn add(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn add(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Add<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
+
operator.source§impl<F, L> Add<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Add<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
+
operator.source§impl<F, L> Add<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn add(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> Add<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Add<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
+
operator.source§fn add(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn add(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
+
operation. Read moresource§impl<F, L> AddAssign<FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> AddAssign<FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
AddAssign operator overloading for field elements
source§fn add_assign(&mut self, rhs: FieldElement<F>)
fn add_assign(&mut self, rhs: FieldElement<F>)
+=
operation. Read moresource§impl<M, const NUM_LIMBS: usize> AsBytes for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
impl<M, const NUM_LIMBS: usize> AsBytes for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
source§impl ByteConversion for FieldElement<Degree2ExtensionField>
impl ByteConversion for FieldElement<Degree2ExtensionField>
source§fn to_bytes_be(&self) -> Vec<u8>
fn to_bytes_be(&self) -> Vec<u8>
source§fn to_bytes_le(&self) -> Vec<u8>
fn to_bytes_le(&self) -> Vec<u8>
source§fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
source§impl<M, const NUM_LIMBS: usize> ByteConversion for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
impl<M, const NUM_LIMBS: usize> ByteConversion for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
source§fn to_bytes_be(&self) -> Vec<u8>
fn to_bytes_be(&self) -> Vec<u8>
source§fn to_bytes_le(&self) -> Vec<u8>
fn to_bytes_le(&self) -> Vec<u8>
source§fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>
fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>
source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>
fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>
source§impl ByteConversion for FieldElement<Degree2ExtensionField>
impl ByteConversion for FieldElement<Degree2ExtensionField>
source§fn to_bytes_be(&self) -> Vec<u8>
fn to_bytes_be(&self) -> Vec<u8>
source§fn to_bytes_le(&self) -> Vec<u8>
fn to_bytes_le(&self) -> Vec<u8>
source§fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
fn from_bytes_be(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
source§fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, ByteConversionError>where
Self: Sized,
source§impl<F: Clone + IsField> Clone for FieldElement<F>
impl<F: Clone + IsField> Clone for FieldElement<F>
source§fn clone(&self) -> FieldElement<F>
fn clone(&self) -> FieldElement<F>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<F> Default for FieldElement<F>where
F: IsField,
impl<F> Default for FieldElement<F>where
F: IsField,
source§impl<const MODULUS: u64> Deserializable for FieldElement<U64PrimeField<MODULUS>>
impl<const MODULUS: u64> Deserializable for FieldElement<U64PrimeField<MODULUS>>
fn deserialize(bytes: &[u8]) -> Result<Self, DeserializationError>where
Self: Sized,
source§impl Display for FieldElement<Goldilocks64Field>
impl Display for FieldElement<Goldilocks64Field>
source§impl Display for FieldElement<Mersenne31Field>
impl Display for FieldElement<Mersenne31Field>
source§impl<M, const NUM_LIMBS: usize> Display for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
impl<M, const NUM_LIMBS: usize> Display for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
source§impl<F, L> Div<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Div<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
Division operator overloading for field elements*/
source§type Output = FieldElement<L>
type Output = FieldElement<L>
/
operator.source§impl<F, L> Div<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Div<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
/
operator.source§impl<F, L> Div<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Div<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
/
operator.source§impl<F, L> Div<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Div<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
/
operator.source§impl<F> From<&<F as IsField>::BaseType> for FieldElement<F>
impl<F> From<&<F as IsField>::BaseType> for FieldElement<F>
From overloading for field elements
source§impl<M, const NUM_LIMBS: usize> From<FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>> for Vec<u8>
impl<M, const NUM_LIMBS: usize> From<FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>> for Vec<u8>
source§fn from(
value: FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>,
) -> Vec<u8>
fn from( value: FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>, ) -> Vec<u8>
source§impl<F, L> Mul<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F: IsField> Mul<&FieldElement<F>> for DenseMultilinearPolynomial<F>
impl<F: IsField> Mul<&FieldElement<F>> for DenseMultilinearPolynomial<F>
source§type Output = DenseMultilinearPolynomial<F>
type Output = DenseMultilinearPolynomial<F>
*
operator.source§impl<F, L> Mul<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> Mul<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Mul<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
Multiplication operator overloading for field elements*/
source§type Output = FieldElement<L>
type Output = FieldElement<L>
*
operator.source§impl<F, L> Mul<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Mul<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
*
operator.source§impl<F, L> Mul<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(
self,
multiplicand: &Polynomial<FieldElement<L>>,
) -> Polynomial<FieldElement<L>>
fn mul( self, multiplicand: &Polynomial<FieldElement<L>>, ) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> Mul<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(
self,
multiplicand: &Polynomial<FieldElement<L>>,
) -> Polynomial<FieldElement<L>>
fn mul( self, multiplicand: &Polynomial<FieldElement<L>>, ) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> Mul<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F: IsField> Mul<FieldElement<F>> for DenseMultilinearPolynomial<F>
impl<F: IsField> Mul<FieldElement<F>> for DenseMultilinearPolynomial<F>
source§type Output = DenseMultilinearPolynomial<F>
type Output = DenseMultilinearPolynomial<F>
*
operator.source§impl<F, L> Mul<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> Mul<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Mul<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
*
operator.source§impl<F, L> Mul<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Mul<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
*
operator.source§impl<F, L> Mul<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(
self,
multiplicand: Polynomial<FieldElement<L>>,
) -> Polynomial<FieldElement<L>>
fn mul( self, multiplicand: Polynomial<FieldElement<L>>, ) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> Mul<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Mul<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
*
operator.source§fn mul(
self,
multiplicand: Polynomial<FieldElement<L>>,
) -> Polynomial<FieldElement<L>>
fn mul( self, multiplicand: Polynomial<FieldElement<L>>, ) -> Polynomial<FieldElement<L>>
*
operation. Read moresource§impl<F, L> MulAssign<&FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> MulAssign<&FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
MulAssign operator overloading for field elements
source§fn mul_assign(&mut self, rhs: &FieldElement<F>)
fn mul_assign(&mut self, rhs: &FieldElement<F>)
*=
operation. Read moresource§impl<F, L> MulAssign<FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> MulAssign<FieldElement<F>> for FieldElement<L>where
F: IsSubFieldOf<L>,
L: IsField,
MulAssign operator overloading for field elements
source§fn mul_assign(&mut self, rhs: FieldElement<F>)
fn mul_assign(&mut self, rhs: FieldElement<F>)
*=
operation. Read moresource§impl<F> Neg for &FieldElement<F>where
F: IsField,
impl<F> Neg for &FieldElement<F>where
F: IsField,
Negation operator overloading for field elements*/
source§impl<F> Neg for FieldElement<F>where
F: IsField,
impl<F> Neg for FieldElement<F>where
F: IsField,
source§impl Ord for FieldElement<Mersenne31MontgomeryPrimeField>
impl Ord for FieldElement<Mersenne31MontgomeryPrimeField>
source§impl Ord for FieldElement<Stark252PrimeField>
impl Ord for FieldElement<Stark252PrimeField>
source§impl Ord for FieldElement<U64GoldilocksPrimeField>
impl Ord for FieldElement<U64GoldilocksPrimeField>
source§impl<F> PartialEq for FieldElement<F>where
F: IsField,
impl<F> PartialEq for FieldElement<F>where
F: IsField,
Equality operator overloading for field elements
source§impl PartialOrd for FieldElement<Mersenne31MontgomeryPrimeField>
impl PartialOrd for FieldElement<Mersenne31MontgomeryPrimeField>
source§impl PartialOrd for FieldElement<Stark252PrimeField>
impl PartialOrd for FieldElement<Stark252PrimeField>
source§impl PartialOrd for FieldElement<U64GoldilocksPrimeField>
impl PartialOrd for FieldElement<U64GoldilocksPrimeField>
source§impl<F, L> Sub<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<&FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<&FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Sub<&FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
Subtraction operator overloading for field elements*/
source§type Output = FieldElement<L>
type Output = FieldElement<L>
-
operator.source§impl<F, L> Sub<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Sub<&FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
-
operator.source§impl<F, L> Sub<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<&Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn sub(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<&Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn sub(self, other: &Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<FieldElement<F>> for &Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<FieldElement<F>> for Polynomial<FieldElement<L>>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Sub<FieldElement<L>> for &FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
-
operator.source§impl<F, L> Sub<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
impl<F, L> Sub<FieldElement<L>> for FieldElement<F>where
F: IsSubFieldOf<L>,
L: IsField,
source§type Output = FieldElement<L>
type Output = FieldElement<L>
-
operator.source§impl<F, L> Sub<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<Polynomial<FieldElement<L>>> for &FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn sub(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F, L> Sub<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
impl<F, L> Sub<Polynomial<FieldElement<L>>> for FieldElement<F>where
L: IsField,
F: IsSubFieldOf<L>,
source§type Output = Polynomial<FieldElement<L>>
type Output = Polynomial<FieldElement<L>>
-
operator.source§fn sub(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
fn sub(self, other: Polynomial<FieldElement<L>>) -> Polynomial<FieldElement<L>>
-
operation. Read moresource§impl<F> Sum for FieldElement<F>where
F: IsField,
impl<F> Sum for FieldElement<F>where
F: IsField,
Sum operator for field elements
impl<F: Copy + IsField> Copy for FieldElement<F>
impl<F> Eq for FieldElement<F>where
F: IsField,
Auto Trait Implementations§
impl<F> Freeze for FieldElement<F>
impl<F> RefUnwindSafe for FieldElement<F>
impl<F> Send for FieldElement<F>
impl<F> Sync for FieldElement<F>
impl<F> Unpin for FieldElement<F>
impl<F> UnwindSafe for FieldElement<F>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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