Struct snarkvm_fields::Fp768
source · [−]pub struct Fp768<P: Fp768Parameters>(pub BigInteger, _);
Tuple Fields
0: BigInteger
Implementations
sourceimpl<P: Fp768Parameters> Fp768<P>
impl<P: Fp768Parameters> Fp768<P>
pub fn new(element: BigInteger) -> Self
Trait Implementations
sourceimpl<P: Fp768Parameters> Add<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Add<&'_ &'_ Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Add<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Add<&'a Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Add<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Add<&'a mut Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Add<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Add<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> AddAssign<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> AddAssign<&'_ &'_ Fp768<P>> for Fp768<P>
sourcefn add_assign(&mut self, other: &&Self)
fn add_assign(&mut self, other: &&Self)
Performs the +=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> AddAssign<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> AddAssign<&'a Fp768<P>> for Fp768<P>
sourcefn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the +=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> AddAssign<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> AddAssign<&'a mut Fp768<P>> for Fp768<P>
sourcefn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the +=
operation. Read more
sourceimpl<P: Fp768Parameters> AddAssign<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> AddAssign<Fp768<P>> for Fp768<P>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the +=
operation. Read more
sourceimpl<P: Fp768Parameters> CanonicalDeserialize for Fp768<P>
impl<P: Fp768Parameters> CanonicalDeserialize for Fp768<P>
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
Reads Self
from reader
.
sourcefn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Self, SerializationError> where
R: Read,
fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Self, SerializationError> where
R: Read,
Reads Self
from reader
without compression.
sourceimpl<P: Fp768Parameters> CanonicalDeserializeWithFlags for Fp768<P>
impl<P: Fp768Parameters> CanonicalDeserializeWithFlags for Fp768<P>
sourcefn deserialize_with_flags<R: Read, F: Flags>(
reader: &mut R
) -> Result<(Self, F), SerializationError>
fn deserialize_with_flags<R: Read, F: Flags>(
reader: &mut R
) -> Result<(Self, F), SerializationError>
Reads Self
and Flags
from reader
.
Returns empty flags by default. Read more
sourceimpl<P: Fp768Parameters> CanonicalSerialize for Fp768<P>
impl<P: Fp768Parameters> CanonicalSerialize for Fp768<P>
sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
Serializes self
into writer
.
fn serialized_size(&self) -> usize
sourcefn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write,
fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write,
Serializes self
into writer
without compression.
fn uncompressed_size(&self) -> usize
sourceimpl<P: Fp768Parameters> CanonicalSerializeWithFlags for Fp768<P>
impl<P: Fp768Parameters> CanonicalSerializeWithFlags for Fp768<P>
sourcefn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: &mut W,
flags: F
) -> Result<(), SerializationError>
fn serialize_with_flags<W: Write, F: Flags>(
&self,
writer: &mut W,
flags: F
) -> Result<(), SerializationError>
Serializes self
and flags
into writer
.
sourceimpl<P: Fp768Parameters> Clone for Fp768<P> where
P: Fp768Parameters,
impl<P: Fp768Parameters> Clone for Fp768<P> where
P: Fp768Parameters,
sourceimpl<P: Fp768Parameters> ConstantSerializedSize for Fp768<P>
impl<P: Fp768Parameters> ConstantSerializedSize for Fp768<P>
const SERIALIZED_SIZE: usize
const UNCOMPRESSED_SIZE: usize
sourceimpl<P: Fp768Parameters> Debug for Fp768<P>
impl<P: Fp768Parameters> Debug for Fp768<P>
sourceimpl<P: Fp768Parameters> Default for Fp768<P> where
P: Fp768Parameters,
impl<P: Fp768Parameters> Default for Fp768<P> where
P: Fp768Parameters,
sourceimpl<'de, P: Fp768Parameters> Deserialize<'de> for Fp768<P>
impl<'de, P: Fp768Parameters> Deserialize<'de> for Fp768<P>
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<P: Fp768Parameters> Display for Fp768<P>
impl<P: Fp768Parameters> Display for Fp768<P>
sourceimpl<P: Fp768Parameters> Distribution<Fp768<P>> for Standard
impl<P: Fp768Parameters> Distribution<Fp768<P>> for Standard
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Fp768<P>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Fp768<P>
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<P: Fp768Parameters> Div<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Div<&'_ &'_ Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Div<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Div<&'a Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Div<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Div<&'a mut Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Div<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Div<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> DivAssign<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> DivAssign<&'_ &'_ Fp768<P>> for Fp768<P>
sourcefn div_assign(&mut self, other: &&Self)
fn div_assign(&mut self, other: &&Self)
Performs the /=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> DivAssign<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> DivAssign<&'a Fp768<P>> for Fp768<P>
sourcefn div_assign(&mut self, other: &Self)
fn div_assign(&mut self, other: &Self)
Performs the /=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> DivAssign<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> DivAssign<&'a mut Fp768<P>> for Fp768<P>
sourcefn div_assign(&mut self, other: &'a mut Self)
fn div_assign(&mut self, other: &'a mut Self)
Performs the /=
operation. Read more
sourceimpl<P: Fp768Parameters> DivAssign<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> DivAssign<Fp768<P>> for Fp768<P>
sourcefn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the /=
operation. Read more
sourceimpl<P: Fp768Parameters> FftField for Fp768<P>
impl<P: Fp768Parameters> FftField for Fp768<P>
type FftParameters = P
sourcefn two_adic_root_of_unity() -> Self
fn two_adic_root_of_unity() -> Self
Returns the 2^s root of unity.
sourcefn large_subgroup_root_of_unity() -> Option<Self>
fn large_subgroup_root_of_unity() -> Option<Self>
Returns the 2^s * small_subgroup_base^small_subgroup_base_adicity root of unity if a small subgroup is defined. Read more
sourcefn multiplicative_generator() -> Self
fn multiplicative_generator() -> Self
Returns the multiplicative generator of char()
- 1 order.
sourcefn get_root_of_unity(n: usize) -> Option<Self>
fn get_root_of_unity(n: usize) -> 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 FftParams::LARGE_SUBGROUP_ROOT_OF_UNITY
(for n = 2^i * FftParams::SMALL_SUBGROUP_BASE^j for some i, j). Read more
sourceimpl<P: Fp768Parameters> Field for Fp768<P>
impl<P: Fp768Parameters> Field for Fp768<P>
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 double_in_place(&mut self)
fn double_in_place(&mut self)
Doubles self
in place.
sourcefn characteristic<'a>() -> &'a [u64]
fn characteristic<'a>() -> &'a [u64]
Returns the characteristic of the field.
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, _: usize)
fn frobenius_map(&mut self, _: usize)
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
sourceimpl<P: Fp768Parameters> From<u128> for Fp768<P>
impl<P: Fp768Parameters> From<u128> for Fp768<P>
sourceimpl<P: Fp768Parameters> From<u16> for Fp768<P>
impl<P: Fp768Parameters> From<u16> for Fp768<P>
sourceimpl<P: Fp768Parameters> From<u32> for Fp768<P>
impl<P: Fp768Parameters> From<u32> for Fp768<P>
sourceimpl<P: Fp768Parameters> From<u64> for Fp768<P>
impl<P: Fp768Parameters> From<u64> for Fp768<P>
sourceimpl<P: Fp768Parameters> From<u8> for Fp768<P>
impl<P: Fp768Parameters> From<u8> for Fp768<P>
sourceimpl<P: Fp768Parameters> FromBytes for Fp768<P>
impl<P: Fp768Parameters> FromBytes for Fp768<P>
sourceimpl<P: Fp768Parameters> FromStr for Fp768<P>
impl<P: Fp768Parameters> FromStr for Fp768<P>
sourceimpl<P: Fp768Parameters> Hash for Fp768<P> where
P: Fp768Parameters,
impl<P: Fp768Parameters> Hash for Fp768<P> where
P: Fp768Parameters,
sourceimpl<P: Fp768Parameters> Into<BigInteger768> for Fp768<P>
impl<P: Fp768Parameters> Into<BigInteger768> for Fp768<P>
sourcefn into(self) -> BigInteger768
fn into(self) -> BigInteger768
Performs the conversion.
sourceimpl<P: Fp768Parameters> Mul<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Mul<&'_ &'_ Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Mul<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Mul<&'a Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Mul<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Mul<&'a mut Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Mul<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Mul<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> MulAssign<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> MulAssign<&'_ &'_ Fp768<P>> for Fp768<P>
sourcefn mul_assign(&mut self, other: &&Self)
fn mul_assign(&mut self, other: &&Self)
Performs the *=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> MulAssign<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> MulAssign<&'a Fp768<P>> for Fp768<P>
sourcefn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the *=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> MulAssign<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> MulAssign<&'a mut Fp768<P>> for Fp768<P>
sourcefn mul_assign(&mut self, other: &'a mut Self)
fn mul_assign(&mut self, other: &'a mut Self)
Performs the *=
operation. Read more
sourceimpl<P: Fp768Parameters> MulAssign<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> MulAssign<Fp768<P>> for Fp768<P>
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the *=
operation. Read more
sourceimpl<P: Fp768Parameters> Neg for Fp768<P>
impl<P: Fp768Parameters> Neg for Fp768<P>
sourceimpl<P: Fp768Parameters> Ord for Fp768<P>
impl<P: Fp768Parameters> Ord for Fp768<P>
sourceimpl<P: Fp768Parameters> PartialEq<Fp768<P>> for Fp768<P> where
P: Fp768Parameters,
impl<P: Fp768Parameters> PartialEq<Fp768<P>> for Fp768<P> where
P: Fp768Parameters,
sourceimpl<P: Fp768Parameters> PartialOrd<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> PartialOrd<Fp768<P>> for Fp768<P>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl<P: Fp768Parameters> PrimeField for Fp768<P>
impl<P: Fp768Parameters> PrimeField for Fp768<P>
type BigInteger = BigInteger
type Parameters = P
sourcefn from_repr(r: BigInteger) -> Option<Self>
fn from_repr(r: BigInteger) -> Option<Self>
Returns a prime field element from its underlying representation.
sourcefn to_repr(&self) -> BigInteger
fn to_repr(&self) -> BigInteger
Returns the underlying representation of the prime field element.
sourcefn from_repr_unchecked(r: BigInteger) -> Self
fn from_repr_unchecked(r: BigInteger) -> Self
Returns a prime field element from its underlying raw representation.
sourcefn to_repr_unchecked(&self) -> BigInteger
fn to_repr_unchecked(&self) -> BigInteger
Returns the underlying raw representation of the prime field element.
sourcefn size_in_bits() -> usize
fn size_in_bits() -> usize
Returns the field size in bits.
sourcefn trace() -> BigInteger
fn trace() -> BigInteger
Returns the trace.
sourcefn trace_minus_one_div_two() -> BigInteger
fn trace_minus_one_div_two() -> BigInteger
Returns the trace minus one divided by two.
sourcefn modulus_minus_one_div_two() -> BigInteger
fn modulus_minus_one_div_two() -> BigInteger
Returns the modulus minus one divided by two.
sourceimpl<'a, P: Fp768Parameters> Product<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Product<&'a Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Product<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Product<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Serialize for Fp768<P>
impl<P: Fp768Parameters> Serialize for Fp768<P>
sourceimpl<P: Fp768Parameters> SquareRootField for Fp768<P>
impl<P: Fp768Parameters> SquareRootField for Fp768<P>
sourcefn legendre(&self) -> LegendreSymbol
fn legendre(&self) -> LegendreSymbol
Returns the Legendre symbol.
sourcefn sqrt_in_place(&mut self) -> Option<&mut Self>
fn sqrt_in_place(&mut self) -> Option<&mut Self>
Sets self
to be the square root of self
, if it exists.
sourceimpl<P: Fp768Parameters> Sub<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Sub<&'_ &'_ Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Sub<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Sub<&'a Fp768<P>> for Fp768<P>
sourceimpl<'a, P: Fp768Parameters> Sub<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Sub<&'a mut Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Sub<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Sub<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> SubAssign<&'_ &'_ Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> SubAssign<&'_ &'_ Fp768<P>> for Fp768<P>
sourcefn sub_assign(&mut self, other: &&Self)
fn sub_assign(&mut self, other: &&Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> SubAssign<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> SubAssign<&'a Fp768<P>> for Fp768<P>
sourcefn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> SubAssign<&'a mut Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> SubAssign<&'a mut Fp768<P>> for Fp768<P>
sourcefn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the -=
operation. Read more
sourceimpl<P: Fp768Parameters> SubAssign<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> SubAssign<Fp768<P>> for Fp768<P>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the -=
operation. Read more
sourceimpl<'a, P: Fp768Parameters> Sum<&'a Fp768<P>> for Fp768<P>
impl<'a, P: Fp768Parameters> Sum<&'a Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> Sum<Fp768<P>> for Fp768<P>
impl<P: Fp768Parameters> Sum<Fp768<P>> for Fp768<P>
sourceimpl<P: Fp768Parameters> ToBits for Fp768<P>
impl<P: Fp768Parameters> ToBits for Fp768<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: Fp768Parameters> ToBytes for Fp768<P>
impl<P: Fp768Parameters> ToBytes for Fp768<P>
sourceimpl<P: Fp768Parameters> Zero for Fp768<P>
impl<P: Fp768Parameters> Zero for Fp768<P>
impl<P: Fp768Parameters> Copy for Fp768<P> where
P: Fp768Parameters,
impl<P: Fp768Parameters> Eq for Fp768<P> where
P: Fp768Parameters,
Auto Trait Implementations
impl<P> RefUnwindSafe for Fp768<P> where
P: RefUnwindSafe,
impl<P> Send for Fp768<P>
impl<P> Sync for Fp768<P>
impl<P> Unpin for Fp768<P> where
P: Unpin,
impl<P> UnwindSafe for Fp768<P> where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more