Struct snarkvm_fields::fp6_3over2::Fp6
source · pub struct Fp6<P: Fp6Parameters> {
pub c0: Fp2<P::Fp2Params>,
pub c1: Fp2<P::Fp2Params>,
pub c2: Fp2<P::Fp2Params>,
}Expand description
An element of Fp6, represented by c0 + c1 * v + c2 * v^(2).
Fields
c0: Fp2<P::Fp2Params>c1: Fp2<P::Fp2Params>c2: Fp2<P::Fp2Params>Implementations
sourceimpl<P: Fp6Parameters> Fp6<P>
impl<P: Fp6Parameters> Fp6<P>
pub fn new(
c0: Fp2<P::Fp2Params>,
c1: Fp2<P::Fp2Params>,
c2: Fp2<P::Fp2Params>
) -> Self
pub fn mul_by_fp(&mut self, element: &<P::Fp2Params as Fp2Parameters>::Fp)
pub fn mul_by_fp2(&mut self, element: &Fp2<P::Fp2Params>)
pub fn mul_by_1(&mut self, c1: &Fp2<P::Fp2Params>)
pub fn mul_by_01(&mut self, c0: &Fp2<P::Fp2Params>, c1: &Fp2<P::Fp2Params>)
Trait Implementations
sourceimpl<P: Fp6Parameters> Add<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Add<&&Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Add<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Add<&'a Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Add<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Add<&'a mut Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Add<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Add<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> AddAssign<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> AddAssign<&&Fp6<P>> for Fp6<P>
sourcefn add_assign(&mut self, other: &&Self)
fn add_assign(&mut self, other: &&Self)
Performs the
+= operation. Read moresourceimpl<'a, P: Fp6Parameters> AddAssign<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> AddAssign<&'a Fp6<P>> for Fp6<P>
sourcefn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moresourceimpl<'a, P: Fp6Parameters> AddAssign<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> AddAssign<&'a mut Fp6<P>> for Fp6<P>
sourcefn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the
+= operation. Read moresourceimpl<P: Fp6Parameters> AddAssign<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> AddAssign<Fp6<P>> for Fp6<P>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moresourceimpl<P: Fp6Parameters> CanonicalDeserialize for Fp6<P>
impl<P: Fp6Parameters> CanonicalDeserialize for Fp6<P>
fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
sourceimpl<P: Fp6Parameters> CanonicalDeserializeWithFlags for Fp6<P>
impl<P: Fp6Parameters> CanonicalDeserializeWithFlags for Fp6<P>
sourcefn deserialize_with_flags<R: Read, F: Flags>(
reader: R
) -> Result<(Self, F), SerializationError>
fn deserialize_with_flags<R: Read, F: Flags>(
reader: R
) -> Result<(Self, F), SerializationError>
sourceimpl<P: Fp6Parameters> CanonicalSerialize for Fp6<P>
impl<P: Fp6Parameters> CanonicalSerialize for Fp6<P>
fn serialize_with_mode<W: Write>(
&self,
writer: W,
_compress: Compress
) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
sourceimpl<P: Fp6Parameters> CanonicalSerializeWithFlags for Fp6<P>
impl<P: Fp6Parameters> CanonicalSerializeWithFlags for Fp6<P>
sourcefn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: W,
flags: F
) -> Result<(), SerializationError>
fn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: W,
flags: F
) -> Result<(), SerializationError>
Serializes
self and flags into writer.sourcefn serialized_size_with_flags<F: Flags>(&self) -> usize
fn serialized_size_with_flags<F: Flags>(&self) -> usize
Serializes
self and flags into writer.sourceimpl<P: Fp6Parameters> Clone for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> Clone for Fp6<P>where
P: Fp6Parameters,
sourceimpl<P: Fp6Parameters> Debug for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> Debug for Fp6<P>where
P: Fp6Parameters,
sourceimpl<P: Fp6Parameters> Default for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> Default for Fp6<P>where
P: Fp6Parameters,
sourceimpl<'de, P: Fp6Parameters> Deserialize<'de> for Fp6<P>
impl<'de, P: Fp6Parameters> Deserialize<'de> for Fp6<P>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<P: Fp6Parameters> Display for Fp6<P>
impl<P: Fp6Parameters> Display for Fp6<P>
sourceimpl<P: Fp6Parameters> Distribution<Fp6<P>> for Standard
impl<P: Fp6Parameters> Distribution<Fp6<P>> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Fp6<P>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Fp6<P>
Generate a random value of
T, using rng as the source of randomness.sourceimpl<P: Fp6Parameters> Div<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Div<&&Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Div<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Div<&'a Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Div<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Div<&'a mut Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Div<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Div<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> DivAssign<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> DivAssign<&&Fp6<P>> for Fp6<P>
sourcefn div_assign(&mut self, other: &&Self)
fn div_assign(&mut self, other: &&Self)
Performs the
/= operation. Read moresourceimpl<'a, P: Fp6Parameters> DivAssign<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> DivAssign<&'a Fp6<P>> for Fp6<P>
sourcefn div_assign(&mut self, other: &Self)
fn div_assign(&mut self, other: &Self)
Performs the
/= operation. Read moresourceimpl<'a, P: Fp6Parameters> DivAssign<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> DivAssign<&'a mut Fp6<P>> for Fp6<P>
sourcefn div_assign(&mut self, other: &'a mut Self)
fn div_assign(&mut self, other: &'a mut Self)
Performs the
/= operation. Read moresourceimpl<P: Fp6Parameters> DivAssign<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> DivAssign<Fp6<P>> for Fp6<P>
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/= operation. Read moresourceimpl<P: Fp6Parameters> Field for Fp6<P>
impl<P: Fp6Parameters> Field for Fp6<P>
type BasePrimeField = <Fp2<<P as Fp6Parameters>::Fp2Params> as Field>::BasePrimeField
sourcefn from_base_prime_field(other: Self::BasePrimeField) -> Self
fn from_base_prime_field(other: Self::BasePrimeField) -> Self
Constructs an element of
Self from an element of the base
prime field. Read moresourcefn characteristic<'a>() -> &'a [u64]
fn characteristic<'a>() -> &'a [u64]
Returns the characteristic of the field.
sourcefn double_in_place(&mut self)
fn double_in_place(&mut self)
Doubles
self in place.sourcefn from_random_bytes_with_flags<F: Flags>(bytes: &[u8]) -> Option<(Self, F)>
fn from_random_bytes_with_flags<F: Flags>(bytes: &[u8]) -> Option<(Self, F)>
Returns a field element with an extra sign bit used for group parsing if
the set of bytes forms a valid field element, otherwise returns
None. This function is primarily intended for sampling
random field elements from a hash-function or RNG output. Read more
sourcefn from_random_bytes(bytes: &[u8]) -> Option<Self>
fn from_random_bytes(bytes: &[u8]) -> Option<Self>
Returns a field element if the set of bytes forms a valid field element,
otherwise returns None. This function is primarily intended for sampling
random field elements from a hash-function or RNG output. Read more
sourcefn square_in_place(&mut self) -> &mut Self
fn square_in_place(&mut self) -> &mut Self
Squares
self in place.sourcefn inverse(&self) -> Option<Self>
fn inverse(&self) -> Option<Self>
Computes the multiplicative inverse of
self if self is nonzero.sourcefn inverse_in_place(&mut self) -> Option<&mut Self>
fn inverse_in_place(&mut self) -> Option<&mut Self>
Sets
self to self’s inverse if it exists. Otherwise it is a no-op.sourcefn frobenius_map(&mut self, power: usize)
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 sum_of_products<'a>(
a: impl Iterator<Item = &'a Self> + Clone,
b: impl Iterator<Item = &'a Self> + Clone
) -> Self
sourceimpl<'a, P: Fp6Parameters> From<&'a [bool]> for Fp6<P>
impl<'a, P: Fp6Parameters> From<&'a [bool]> for Fp6<P>
sourceimpl<P: Fp6Parameters> From<u128> for Fp6<P>
impl<P: Fp6Parameters> From<u128> for Fp6<P>
sourceimpl<P: Fp6Parameters> From<u16> for Fp6<P>
impl<P: Fp6Parameters> From<u16> for Fp6<P>
sourceimpl<P: Fp6Parameters> From<u32> for Fp6<P>
impl<P: Fp6Parameters> From<u32> for Fp6<P>
sourceimpl<P: Fp6Parameters> From<u64> for Fp6<P>
impl<P: Fp6Parameters> From<u64> for Fp6<P>
sourceimpl<P: Fp6Parameters> From<u8> for Fp6<P>
impl<P: Fp6Parameters> From<u8> for Fp6<P>
sourceimpl<P: Fp6Parameters> FromBytes for Fp6<P>
impl<P: Fp6Parameters> FromBytes for Fp6<P>
sourceimpl<P: Fp6Parameters> Hash for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> Hash for Fp6<P>where
P: Fp6Parameters,
sourceimpl<P: Fp6Parameters> Mul<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Mul<&&Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Mul<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Mul<&'a Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Mul<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Mul<&'a mut Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Mul<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Mul<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> MulAssign<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> MulAssign<&&Fp6<P>> for Fp6<P>
sourcefn mul_assign(&mut self, other: &&Self)
fn mul_assign(&mut self, other: &&Self)
Performs the
*= operation. Read moresourceimpl<'a, P: Fp6Parameters> MulAssign<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> MulAssign<&'a Fp6<P>> for Fp6<P>
sourcefn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*= operation. Read moresourceimpl<'a, P: Fp6Parameters> MulAssign<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> MulAssign<&'a mut Fp6<P>> for Fp6<P>
sourcefn mul_assign(&mut self, other: &'a mut Self)
fn mul_assign(&mut self, other: &'a mut Self)
Performs the
*= operation. Read moresourceimpl<P: Fp6Parameters> MulAssign<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> MulAssign<Fp6<P>> for Fp6<P>
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moresourceimpl<P: Fp6Parameters> Neg for Fp6<P>
impl<P: Fp6Parameters> Neg for Fp6<P>
sourceimpl<P: Fp6Parameters> One for Fp6<P>
impl<P: Fp6Parameters> One for Fp6<P>
sourceimpl<P: Fp6Parameters> Ord for Fp6<P>
impl<P: Fp6Parameters> Ord for Fp6<P>
Fp3 elements are ordered lexicographically.
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<P: Fp6Parameters> PartialEq<Fp6<P>> for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> PartialEq<Fp6<P>> for Fp6<P>where
P: Fp6Parameters,
sourceimpl<P: Fp6Parameters> PartialOrd<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> PartialOrd<Fp6<P>> for Fp6<P>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl<'a, P: Fp6Parameters> Product<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Product<&'a Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Product<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Product<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Serialize for Fp6<P>
impl<P: Fp6Parameters> Serialize for Fp6<P>
sourceimpl<P: Fp6Parameters> Sub<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Sub<&&Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Sub<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Sub<&'a Fp6<P>> for Fp6<P>
sourceimpl<'a, P: Fp6Parameters> Sub<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Sub<&'a mut Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Sub<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Sub<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> SubAssign<&&Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> SubAssign<&&Fp6<P>> for Fp6<P>
sourcefn sub_assign(&mut self, other: &&Self)
fn sub_assign(&mut self, other: &&Self)
Performs the
-= operation. Read moresourceimpl<'a, P: Fp6Parameters> SubAssign<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> SubAssign<&'a Fp6<P>> for Fp6<P>
sourcefn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-= operation. Read moresourceimpl<'a, P: Fp6Parameters> SubAssign<&'a mut Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> SubAssign<&'a mut Fp6<P>> for Fp6<P>
sourcefn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the
-= operation. Read moresourceimpl<P: Fp6Parameters> SubAssign<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> SubAssign<Fp6<P>> for Fp6<P>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moresourceimpl<'a, P: Fp6Parameters> Sum<&'a Fp6<P>> for Fp6<P>
impl<'a, P: Fp6Parameters> Sum<&'a Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> Sum<Fp6<P>> for Fp6<P>
impl<P: Fp6Parameters> Sum<Fp6<P>> for Fp6<P>
sourceimpl<P: Fp6Parameters> ToBits for Fp6<P>
impl<P: Fp6Parameters> ToBits for Fp6<P>
sourcefn to_bits_le(&self) -> Vec<bool>
fn to_bits_le(&self) -> Vec<bool>
Returns
self as a boolean array in little-endian order.sourcefn to_bits_be(&self) -> Vec<bool>
fn to_bits_be(&self) -> Vec<bool>
Returns
self as a boolean array in big-endian order.sourceimpl<P: Fp6Parameters> ToBytes for Fp6<P>
impl<P: Fp6Parameters> ToBytes for Fp6<P>
sourceimpl<P: Fp6Parameters> Valid for Fp6<P>
impl<P: Fp6Parameters> Valid for Fp6<P>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
_batch: impl Iterator<Item = &'a Self>
) -> Result<(), SerializationError>where
Self: 'a,
impl<P: Fp6Parameters> Copy for Fp6<P>where
P: Fp6Parameters,
impl<P: Fp6Parameters> Eq for Fp6<P>where
P: Fp6Parameters,
Auto Trait Implementations
impl<P> RefUnwindSafe for Fp6<P>where
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp: RefUnwindSafe,
impl<P> Send for Fp6<P>
impl<P> Sync for Fp6<P>
impl<P> Unpin for Fp6<P>where
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp: Unpin,
impl<P> UnwindSafe for Fp6<P>where
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more