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>
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
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::InvalidHexStringif the value is not a hexstring.
Returns a CreationError::EmptyString if the input string is empty.
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<Q> FieldElement<QuadraticExtensionField<Q>>
impl<Q> FieldElement<QuadraticExtensionField<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> Add<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Add<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
Addition operator overloading for field elements
§type Output = FieldElement<F>
type Output = FieldElement<F>
+ operator.source§impl<F: IsField> Add<&FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Add<&FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F> Add<&FieldElement<F>> for FieldElement<F>where
F: IsField,
impl<F> Add<&FieldElement<F>> for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
+ operator.source§impl<F: IsField> Add<&FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Add<&FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn add(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F: IsField> Add<&Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Add<&Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn add(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F: IsField> Add<&Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Add<&Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn add(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F> Add<FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Add<FieldElement<F>> for &FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
+ operator.source§impl<F: IsField> Add<FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Add<FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F: IsField> Add<FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Add<FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn add(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F: IsField> Add<Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Add<Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn add(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F: IsField> Add<Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Add<Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
+ operator.source§fn add(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn add(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
+ operation. Read moresource§impl<F> Add for FieldElement<F>where
F: IsField,
impl<F> Add for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
+ operator.source§impl<F> AddAssign for FieldElement<F>where
F: IsField,
impl<F> AddAssign for FieldElement<F>where
F: 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 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<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> Div<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Div<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
Division operator overloading for field elements*/
§type Output = FieldElement<F>
type Output = FieldElement<F>
/ operator.source§impl<F> Div<&FieldElement<F>> for FieldElement<F>where
F: IsField,
impl<F> Div<&FieldElement<F>> for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
/ operator.source§impl<F> Div<FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Div<FieldElement<F>> for &FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
/ operator.source§impl<F> Div for FieldElement<F>where
F: IsField,
impl<F> Div for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
/ 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<F> Mul<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Mul<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
Multiplication operator overloading for field elements*/
§type Output = FieldElement<F>
type Output = FieldElement<F>
* operator.source§impl<F: IsField> Mul<&FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Mul<&FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F> Mul<&FieldElement<F>> for FieldElement<F>where
F: IsField,
impl<F> Mul<&FieldElement<F>> for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
* operator.source§impl<F: IsField> Mul<&FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Mul<&FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn mul(self, multiplicand: &FieldElement<F>) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F: IsField> Mul<&Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Mul<&Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(
self,
multiplicand: &Polynomial<FieldElement<F>>
) -> Polynomial<FieldElement<F>>
fn mul( self, multiplicand: &Polynomial<FieldElement<F>> ) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F: IsField> Mul<&Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Mul<&Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(
self,
multiplicand: &Polynomial<FieldElement<F>>
) -> Polynomial<FieldElement<F>>
fn mul( self, multiplicand: &Polynomial<FieldElement<F>> ) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F> Mul<FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Mul<FieldElement<F>> for &FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
* operator.source§impl<F: IsField> Mul<FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Mul<FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F: IsField> Mul<FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Mul<FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn mul(self, multiplicand: FieldElement<F>) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F: IsField> Mul<Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Mul<Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(
self,
multiplicand: Polynomial<FieldElement<F>>
) -> Polynomial<FieldElement<F>>
fn mul( self, multiplicand: Polynomial<FieldElement<F>> ) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F: IsField> Mul<Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Mul<Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
* operator.source§fn mul(
self,
multiplicand: Polynomial<FieldElement<F>>
) -> Polynomial<FieldElement<F>>
fn mul( self, multiplicand: Polynomial<FieldElement<F>> ) -> Polynomial<FieldElement<F>>
* operation. Read moresource§impl<F> Mul for FieldElement<F>where
F: IsField,
impl<F> Mul for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
* operator.source§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§fn eq(&self, other: &FieldElement<F>) -> bool
fn eq(&self, other: &FieldElement<F>) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for FieldElement<Mersenne31MontgomeryPrimeField>
impl PartialOrd for FieldElement<Mersenne31MontgomeryPrimeField>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd for FieldElement<Stark252PrimeField>
impl PartialOrd for FieldElement<Stark252PrimeField>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd for FieldElement<U64GoldilocksPrimeField>
impl PartialOrd for FieldElement<U64GoldilocksPrimeField>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl<M, const NUM_LIMBS: usize> Serializable for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
impl<M, const NUM_LIMBS: usize> Serializable for FieldElement<MontgomeryBackendPrimeField<M, NUM_LIMBS>>
source§impl<const MODULUS: u64> Serializable for FieldElement<U64PrimeField<MODULUS>>
impl<const MODULUS: u64> Serializable for FieldElement<U64PrimeField<MODULUS>>
source§impl<F> Sub<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Sub<&FieldElement<F>> for &FieldElement<F>where
F: IsField,
Subtraction operator overloading for field elements*/
§type Output = FieldElement<F>
type Output = FieldElement<F>
- operator.source§impl<F: IsField> Sub<&FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Sub<&FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F> Sub<&FieldElement<F>> for FieldElement<F>where
F: IsField,
impl<F> Sub<&FieldElement<F>> for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
- operator.source§impl<F: IsField> Sub<&FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Sub<&FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
fn sub(self, other: &FieldElement<F>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F: IsField> Sub<&Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Sub<&Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn sub(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F: IsField> Sub<&Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Sub<&Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn sub(self, other: &Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F> Sub<FieldElement<F>> for &FieldElement<F>where
F: IsField,
impl<F> Sub<FieldElement<F>> for &FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
- operator.source§impl<F: IsField> Sub<FieldElement<F>> for &Polynomial<FieldElement<F>>
impl<F: IsField> Sub<FieldElement<F>> for &Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F: IsField> Sub<FieldElement<F>> for Polynomial<FieldElement<F>>
impl<F: IsField> Sub<FieldElement<F>> for Polynomial<FieldElement<F>>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
fn sub(self, other: FieldElement<F>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F: IsField> Sub<Polynomial<FieldElement<F>>> for &FieldElement<F>
impl<F: IsField> Sub<Polynomial<FieldElement<F>>> for &FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn sub(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F: IsField> Sub<Polynomial<FieldElement<F>>> for FieldElement<F>
impl<F: IsField> Sub<Polynomial<FieldElement<F>>> for FieldElement<F>
§type Output = Polynomial<FieldElement<F>>
type Output = Polynomial<FieldElement<F>>
- operator.source§fn sub(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
fn sub(self, other: Polynomial<FieldElement<F>>) -> Polynomial<FieldElement<F>>
- operation. Read moresource§impl<F> Sub for FieldElement<F>where
F: IsField,
impl<F> Sub for FieldElement<F>where
F: IsField,
§type Output = FieldElement<F>
type Output = FieldElement<F>
- operator.source§impl<F> Sum for FieldElement<F>where
F: IsField,
impl<F> Sum for FieldElement<F>where
F: IsField,
Sum operator for field elements