pub struct Felt { /* private fields */ }Expand description
The prime field known as Goldilocks, defined as F_p where p = 2^64 - 2^32 + 1.
Note that the safety of deriving Serialize and Deserialize relies on the fact that the internal value can be any u64.
Implementations§
Source§impl Goldilocks
impl Goldilocks
Sourcepub const TWO_ADIC_GENERATORS: [Goldilocks; 33]
pub const TWO_ADIC_GENERATORS: [Goldilocks; 33]
A list of generators for the two-adic subgroups of the goldilocks field.
These satisfy the properties that TWO_ADIC_GENERATORS[0] = 1 and TWO_ADIC_GENERATORS[i+1]^2 = TWO_ADIC_GENERATORS[i].
Sourcepub const fn new(value: u64) -> Goldilocks
pub const fn new(value: u64) -> Goldilocks
Create a new field element from any u64.
Any u64 value is accepted. No reduction is performed since
Goldilocks uses a non-canonical internal representation.
Trait Implementations§
Source§impl Add for Goldilocks
impl Add for Goldilocks
Source§type Output = Goldilocks
type Output = Goldilocks
+ operator.Source§fn add(self, rhs: Goldilocks) -> Goldilocks
fn add(self, rhs: Goldilocks) -> Goldilocks
+ operation. Read moreSource§impl<T> AddAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
impl<T> AddAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
Source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
+= operation. Read moreSource§impl BinomiallyExtendable<2> for Goldilocks
impl BinomiallyExtendable<2> for Goldilocks
Source§const W: Goldilocks
const W: Goldilocks
W in the binomial X^D - W.Source§const DTH_ROOT: Goldilocks
const DTH_ROOT: Goldilocks
Source§const EXT_GENERATOR: [Goldilocks; 2]
const EXT_GENERATOR: [Goldilocks; 2]
D polynomial. Read moreSource§impl BinomiallyExtendable<5> for Goldilocks
impl BinomiallyExtendable<5> for Goldilocks
Source§const W: Goldilocks
const W: Goldilocks
W in the binomial X^D - W.Source§const DTH_ROOT: Goldilocks
const DTH_ROOT: Goldilocks
Source§const EXT_GENERATOR: [Goldilocks; 5]
const EXT_GENERATOR: [Goldilocks; 5]
D polynomial. Read moreSource§impl BinomiallyExtendableAlgebra<Goldilocks, 2> for Goldilocks
impl BinomiallyExtendableAlgebra<Goldilocks, 2> for Goldilocks
Source§fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
A<X> / (X^D - W). Read moreSource§fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read moreSource§fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read morefn binomial_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
Source§impl BinomiallyExtendableAlgebra<Goldilocks, 5> for Goldilocks
impl BinomiallyExtendableAlgebra<Goldilocks, 5> for Goldilocks
Source§fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
A<X> / (X^D - W). Read moreSource§fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read moreSource§fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read morefn binomial_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
Source§impl Clone for Goldilocks
impl Clone for Goldilocks
Source§fn clone(&self) -> Goldilocks
fn clone(&self) -> Goldilocks
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Goldilocks
impl Debug for Goldilocks
Source§impl Default for Goldilocks
impl Default for Goldilocks
Source§fn default() -> Goldilocks
fn default() -> Goldilocks
Source§impl Deserializable for Goldilocks
impl Deserializable for Goldilocks
Source§fn read_from<R>(source: &mut R) -> Result<Goldilocks, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<Goldilocks, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
Source§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§fn read_from_bytes_with_budget(
bytes: &[u8],
budget: usize,
) -> Result<Self, DeserializationError>
fn read_from_bytes_with_budget( bytes: &[u8], budget: usize, ) -> Result<Self, DeserializationError>
Self from bytes with a byte budget limit. Read moreSource§impl<'de> Deserialize<'de> for Goldilocks
impl<'de> Deserialize<'de> for Goldilocks
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Goldilocks, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Goldilocks, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for Goldilocks
impl Display for Goldilocks
Source§impl Div for Goldilocks
impl Div for Goldilocks
Source§type Output = Goldilocks
type Output = Goldilocks
/ operator.Source§fn div(self, rhs: Goldilocks) -> Goldilocks
fn div(self, rhs: Goldilocks) -> Goldilocks
/ operation. Read moreSource§impl DivAssign for Goldilocks
impl DivAssign for Goldilocks
Source§fn div_assign(&mut self, rhs: Goldilocks)
fn div_assign(&mut self, rhs: Goldilocks)
/= operation. Read moreSource§impl Field for Goldilocks
impl Field for Goldilocks
Source§const GENERATOR: Goldilocks
const GENERATOR: Goldilocks
type Packing = Goldilocks
Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Source§fn try_inverse(&self) -> Option<Goldilocks>
fn try_inverse(&self) -> Option<Goldilocks>
Source§fn is_one(&self) -> bool
fn is_one(&self) -> bool
Source§fn add_slices(slice_1: &mut [Self], slice_2: &[Self])
fn add_slices(slice_1: &mut [Self], slice_2: &[Self])
Source§impl From<Goldilocks> for Forest
impl From<Goldilocks> for Forest
Source§impl HasTwoAdicBinomialExtension<2> for Goldilocks
impl HasTwoAdicBinomialExtension<2> for Goldilocks
Source§const EXT_TWO_ADICITY: usize = 33
const EXT_TWO_ADICITY: usize = 33
Source§fn ext_two_adic_generator(bits: usize) -> [Goldilocks; 2]
fn ext_two_adic_generator(bits: usize) -> [Goldilocks; 2]
Source§impl HasTwoAdicBinomialExtension<5> for Goldilocks
impl HasTwoAdicBinomialExtension<5> for Goldilocks
Source§const EXT_TWO_ADICITY: usize = 32
const EXT_TWO_ADICITY: usize = 32
Source§fn ext_two_adic_generator(bits: usize) -> [Goldilocks; 5]
fn ext_two_adic_generator(bits: usize) -> [Goldilocks; 5]
Source§impl Hash for Goldilocks
impl Hash for Goldilocks
Source§impl InjectiveMonomial<7> for Goldilocks
Degree of the smallest permutation polynomial for Goldilocks.
impl InjectiveMonomial<7> for Goldilocks
Degree of the smallest permutation polynomial for Goldilocks.
As p - 1 = 2^32 * 3 * 5 * 17 * … the smallest choice for a degree D satisfying gcd(p - 1, D) = 1 is 7.
Source§fn injective_exp_n(&self) -> Self
fn injective_exp_n(&self) -> Self
x -> x^n for a given n > 1 such that this
map is injective.Source§impl Mul for Goldilocks
impl Mul for Goldilocks
Source§type Output = Goldilocks
type Output = Goldilocks
* operator.Source§fn mul(self, rhs: Goldilocks) -> Goldilocks
fn mul(self, rhs: Goldilocks) -> Goldilocks
* operation. Read moreSource§impl<T> MulAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
impl<T> MulAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
*= operation. Read moreSource§impl Neg for Goldilocks
impl Neg for Goldilocks
Source§impl Ord for Goldilocks
impl Ord for Goldilocks
Source§fn cmp(&self, other: &Goldilocks) -> Ordering
fn cmp(&self, other: &Goldilocks) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Goldilocks
impl PartialEq for Goldilocks
Source§impl PartialOrd for Goldilocks
impl PartialOrd for Goldilocks
Source§impl PermutationMonomial<7> for Goldilocks
impl PermutationMonomial<7> for Goldilocks
Source§fn injective_exp_root_n(&self) -> Goldilocks
fn injective_exp_root_n(&self) -> Goldilocks
In the field Goldilocks, a^{1/7} is equal to a^{10540996611094048183}.
This follows from the calculation 7*10540996611094048183 = 4*(2^64 - 2**32) + 1 = 1 mod (p - 1).
Source§impl PrimeCharacteristicRing for Goldilocks
impl PrimeCharacteristicRing for Goldilocks
Source§const ZERO: Goldilocks
const ZERO: Goldilocks
Source§const ONE: Goldilocks
const ONE: Goldilocks
Source§const TWO: Goldilocks
const TWO: Goldilocks
ONE + ONE. Read moreSource§const NEG_ONE: Goldilocks
const NEG_ONE: Goldilocks
-ONE. Read moreSource§type PrimeSubfield = Goldilocks
type PrimeSubfield = Goldilocks
ℤ/p where the characteristic of this ring is p.Source§fn from_prime_subfield(
f: <Goldilocks as PrimeCharacteristicRing>::PrimeSubfield,
) -> Goldilocks
fn from_prime_subfield( f: <Goldilocks as PrimeCharacteristicRing>::PrimeSubfield, ) -> Goldilocks
Source§fn from_bool(b: bool) -> Goldilocks
fn from_bool(b: bool) -> Goldilocks
Self::ONE if b is true and Self::ZERO if b is false.Source§fn halve(&self) -> Goldilocks
fn halve(&self) -> Goldilocks
halve(a) = a/2. Read moreSource§fn mul_2exp_u64(&self, exp: u64) -> Goldilocks
fn mul_2exp_u64(&self, exp: u64) -> Goldilocks
mul_2exp_u64(a, exp) = a * 2^{exp}. Read moreSource§fn div_2exp_u64(&self, exp: u64) -> Goldilocks
fn div_2exp_u64(&self, exp: u64) -> Goldilocks
div_2exp_u64(a, exp) = a/2^exp Read moreSource§fn sum_array<const N: usize>(input: &[Goldilocks]) -> Goldilocks
fn sum_array<const N: usize>(input: &[Goldilocks]) -> Goldilocks
Source§fn dot_product<const N: usize>(
lhs: &[Goldilocks; N],
rhs: &[Goldilocks; N],
) -> Goldilocks
fn dot_product<const N: usize>( lhs: &[Goldilocks; N], rhs: &[Goldilocks; N], ) -> Goldilocks
Source§fn zero_vec(len: usize) -> Vec<Goldilocks>
fn zero_vec(len: usize) -> Vec<Goldilocks>
len. Many operating systems zero pages
before assigning them to a userspace process. In that case, our process should not need to
write zeros, which would be redundant. However, the compiler may not always recognize this. Read moreSource§fn from_usize(int: usize) -> Self
fn from_usize(int: usize) -> Self
Source§fn from_isize(int: isize) -> Self
fn from_isize(int: isize) -> Self
Source§fn xor(&self, y: &Self) -> Self
fn xor(&self, y: &Self) -> Self
xor. Read moreSource§fn xor3(&self, y: &Self, z: &Self) -> Self
fn xor3(&self, y: &Self, z: &Self) -> Self
xor. Read moreSource§fn bool_check(&self) -> Self
fn bool_check(&self) -> Self
x * (x - 1). Read moreSource§fn exp_const_u64<const POWER: u64>(&self) -> Self
fn exp_const_u64<const POWER: u64>(&self) -> Self
Source§fn exp_power_of_2(&self, power_log: usize) -> Self
fn exp_power_of_2(&self, power_log: usize) -> Self
exp_power_of_2(a, power_log) = a^{2^power_log}. Read moreSource§fn powers(&self) -> Powers<Self>
fn powers(&self) -> Powers<Self>
self: self^0, self^1, self^2, ....Source§fn shifted_powers(&self, start: Self) -> Powers<Self>
fn shifted_powers(&self, start: Self) -> Powers<Self>
self shifted by start: start, start*self^1, start*self^2, ....Source§impl PrimeField for Goldilocks
impl PrimeField for Goldilocks
Source§fn as_canonical_biguint(&self) -> BigUint
fn as_canonical_biguint(&self) -> BigUint
value in canonical form
which lies in the range 0 <= x < self.order().Source§impl PrimeField64 for Goldilocks
impl PrimeField64 for Goldilocks
const ORDER_U64: u64 = P
Source§fn as_canonical_u64(&self) -> u64
fn as_canonical_u64(&self) -> u64
value in canonical form
which lies in the range 0 <= x < ORDER_U64.Source§fn to_unique_u64(&self) -> u64
fn to_unique_u64(&self) -> u64
u64 such that any two field elements
are converted to the same u64 if and only if they represent the same value. Read moreSource§impl Product for Goldilocks
impl Product for Goldilocks
Source§fn product<I>(iter: I) -> Goldilockswhere
I: Iterator<Item = Goldilocks>,
fn product<I>(iter: I) -> Goldilockswhere
I: Iterator<Item = Goldilocks>,
Self from the elements by multiplying
the items.Source§impl QuotientMap<i128> for Goldilocks
impl QuotientMap<i128> for Goldilocks
Source§fn from_int(int: i128) -> Goldilocks
fn from_int(int: i128) -> Goldilocks
Convert a given i128 integer into an element of the Goldilocks field.
This checks the sign and then makes use of the equivalent method for unsigned integers. This should be avoided in performance critical locations.
Source§fn from_canonical_checked(int: i128) -> Option<Goldilocks>
fn from_canonical_checked(int: i128) -> Option<Goldilocks>
Convert a given u128 integer into an element of the Goldilocks field.
Returns None if the input does not lie in the range:[-(2^63 - 2^31), 2^63 - 2^31].
Source§unsafe fn from_canonical_unchecked(int: i128) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
§Safety
The input must lie in the range:[1 + 2^32 - 2^64, 2^64 - 1].
Source§impl QuotientMap<i16> for Goldilocks
impl QuotientMap<i16> for Goldilocks
Source§fn from_int(int: i16) -> Goldilocks
fn from_int(int: i16) -> Goldilocks
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i16) -> Option<Goldilocks>
fn from_canonical_checked(int: i16) -> Option<Goldilocks>
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i16) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i16) -> Goldilocks
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<i32> for Goldilocks
impl QuotientMap<i32> for Goldilocks
Source§fn from_int(int: i32) -> Goldilocks
fn from_int(int: i32) -> Goldilocks
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i32) -> Option<Goldilocks>
fn from_canonical_checked(int: i32) -> Option<Goldilocks>
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i32) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i32) -> Goldilocks
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<i64> for Goldilocks
impl QuotientMap<i64> for Goldilocks
Source§fn from_int(int: i64) -> Goldilocks
fn from_int(int: i64) -> Goldilocks
Convert a given i64 integer into an element of the Goldilocks field.
We simply need to deal with the sign.
Source§fn from_canonical_checked(int: i64) -> Option<Goldilocks>
fn from_canonical_checked(int: i64) -> Option<Goldilocks>
Convert a given i64 integer into an element of the Goldilocks field.
Returns none if the input does not lie in the range (-(2^63 - 2^31), 2^63 - 2^31).
Source§unsafe fn from_canonical_unchecked(int: i64) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i64) -> Goldilocks
Convert a given i64 integer into an element of the Goldilocks field.
§Safety
In this case this function is actually always safe as the internal value is allowed to be any u64.
Source§impl QuotientMap<i8> for Goldilocks
impl QuotientMap<i8> for Goldilocks
Source§fn from_int(int: i8) -> Goldilocks
fn from_int(int: i8) -> Goldilocks
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i8) -> Option<Goldilocks>
fn from_canonical_checked(int: i8) -> Option<Goldilocks>
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i8) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i8) -> Goldilocks
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u128> for Goldilocks
impl QuotientMap<u128> for Goldilocks
Source§fn from_int(int: u128) -> Goldilocks
fn from_int(int: u128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
Uses a modular reduction to reduce to canonical form. This should be avoided in performance critical locations.
Source§fn from_canonical_checked(int: u128) -> Option<Goldilocks>
fn from_canonical_checked(int: u128) -> Option<Goldilocks>
Convert a given u128 integer into an element of the Goldilocks field.
Returns None if the input does not lie in the range:[0, 2^64 - 2^32].
Source§unsafe fn from_canonical_unchecked(int: u128) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
§Safety
The input must lie in the range:[0, 2^64 - 1].
Source§impl QuotientMap<u16> for Goldilocks
impl QuotientMap<u16> for Goldilocks
Source§fn from_int(int: u16) -> Goldilocks
fn from_int(int: u16) -> Goldilocks
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u16) -> Option<Goldilocks>
fn from_canonical_checked(int: u16) -> Option<Goldilocks>
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u16) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u16) -> Goldilocks
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u32> for Goldilocks
impl QuotientMap<u32> for Goldilocks
Source§fn from_int(int: u32) -> Goldilocks
fn from_int(int: u32) -> Goldilocks
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u32) -> Option<Goldilocks>
fn from_canonical_checked(int: u32) -> Option<Goldilocks>
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u32) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u32) -> Goldilocks
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u64> for Goldilocks
impl QuotientMap<u64> for Goldilocks
Source§fn from_int(int: u64) -> Goldilocks
fn from_int(int: u64) -> Goldilocks
Convert a given u64 integer into an element of the Goldilocks field.
No reduction is needed as the internal value is allowed to be any u64.
Source§fn from_canonical_checked(int: u64) -> Option<Goldilocks>
fn from_canonical_checked(int: u64) -> Option<Goldilocks>
Convert a given u64 integer into an element of the Goldilocks field.
Return None if the given integer is greater than p = 2^64 - 2^32 + 1.
Source§unsafe fn from_canonical_unchecked(int: u64) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u64) -> Goldilocks
Convert a given u64 integer into an element of the Goldilocks field.
§Safety
In this case this function is actually always safe as the internal value is allowed to be any u64.
Source§impl QuotientMap<u8> for Goldilocks
impl QuotientMap<u8> for Goldilocks
Source§fn from_int(int: u8) -> Goldilocks
fn from_int(int: u8) -> Goldilocks
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u8) -> Option<Goldilocks>
fn from_canonical_checked(int: u8) -> Option<Goldilocks>
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u8) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u8) -> Goldilocks
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl Randomizable for Felt
impl Randomizable for Felt
Source§const VALUE_SIZE: usize = 8
const VALUE_SIZE: usize = 8
Self in bytes. Read moreSource§fn from_random_bytes(source: &[u8]) -> Option<Self>
fn from_random_bytes(source: &[u8]) -> Option<Self>
Self if the set of bytes forms a valid value, otherwise returns None.Source§impl RawDataSerializable for Goldilocks
impl RawDataSerializable for Goldilocks
Source§const NUM_BYTES: usize = 8
const NUM_BYTES: usize = 8
Source§fn into_bytes(self) -> [u8; 8]
fn into_bytes(self) -> [u8; 8]
Source§fn into_u32_stream(
input: impl IntoIterator<Item = Goldilocks>,
) -> impl IntoIterator<Item = u32>
fn into_u32_stream( input: impl IntoIterator<Item = Goldilocks>, ) -> impl IntoIterator<Item = u32>
Source§fn into_u64_stream(
input: impl IntoIterator<Item = Goldilocks>,
) -> impl IntoIterator<Item = u64>
fn into_u64_stream( input: impl IntoIterator<Item = Goldilocks>, ) -> impl IntoIterator<Item = u64>
Source§fn into_parallel_byte_streams<const N: usize>(
input: impl IntoIterator<Item = [Goldilocks; N]>,
) -> impl IntoIterator<Item = [u8; N]>
fn into_parallel_byte_streams<const N: usize>( input: impl IntoIterator<Item = [Goldilocks; N]>, ) -> impl IntoIterator<Item = [u8; N]>
Source§fn into_parallel_u32_streams<const N: usize>(
input: impl IntoIterator<Item = [Goldilocks; N]>,
) -> impl IntoIterator<Item = [u32; N]>
fn into_parallel_u32_streams<const N: usize>( input: impl IntoIterator<Item = [Goldilocks; N]>, ) -> impl IntoIterator<Item = [u32; N]>
Source§fn into_parallel_u64_streams<const N: usize>(
input: impl IntoIterator<Item = [Goldilocks; N]>,
) -> impl IntoIterator<Item = [u64; N]>
fn into_parallel_u64_streams<const N: usize>( input: impl IntoIterator<Item = [Goldilocks; N]>, ) -> impl IntoIterator<Item = [u64; N]>
Source§fn into_byte_stream(
input: impl IntoIterator<Item = Self>,
) -> impl IntoIterator<Item = u8>
fn into_byte_stream( input: impl IntoIterator<Item = Self>, ) -> impl IntoIterator<Item = u8>
Source§impl Serializable for Goldilocks
impl Serializable for Goldilocks
Source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Source§impl Serialize for Goldilocks
impl Serialize for Goldilocks
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sub for Goldilocks
impl Sub for Goldilocks
Source§type Output = Goldilocks
type Output = Goldilocks
- operator.Source§fn sub(self, rhs: Goldilocks) -> Goldilocks
fn sub(self, rhs: Goldilocks) -> Goldilocks
- operation. Read moreSource§impl<T> SubAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
impl<T> SubAssign<T> for Goldilockswhere
T: Into<Goldilocks>,
Source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
-= operation. Read moreSource§impl Sum for Goldilocks
impl Sum for Goldilocks
Source§fn sum<I>(iter: I) -> Goldilockswhere
I: Iterator<Item = Goldilocks>,
fn sum<I>(iter: I) -> Goldilockswhere
I: Iterator<Item = Goldilocks>,
Self from the elements by “summing up”
the items.Source§impl TwoAdicField for Goldilocks
impl TwoAdicField for Goldilocks
Source§const TWO_ADICITY: usize = 32
const TWO_ADICITY: usize = 32
Source§fn two_adic_generator(bits: usize) -> Goldilocks
fn two_adic_generator(bits: usize) -> Goldilocks
2^bits.
Assumes bits <= TWO_ADICITY, otherwise the result is undefined.Source§impl UniformSamplingField for Goldilocks
impl UniformSamplingField for Goldilocks
Source§const MAX_SINGLE_SAMPLE_BITS: usize = 24
const MAX_SINGLE_SAMPLE_BITS: usize = 24
impl Copy for Goldilocks
impl Eq for Goldilocks
impl Packable for Goldilocks
Auto Trait Implementations§
impl Freeze for Goldilocks
impl RefUnwindSafe for Goldilocks
impl Send for Goldilocks
impl Sync for Goldilocks
impl Unpin for Goldilocks
impl UnwindSafe for Goldilocks
Blanket Implementations§
Source§impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
Source§const DIMENSION: usize = 1
const DIMENSION: usize = 1
Source§fn as_basis_coefficients_slice(&self) -> &[F]
fn as_basis_coefficients_slice(&self) -> &[F]
A and uses this to
map an element of A to a slice of DIMENSION F elements. Read moreSource§fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
A and uses this to
map DIMENSION F elements to an element of A. Similar
to core:array::from_fn, the DIMENSION F elements are
given by Fn(0), ..., Fn(DIMENSION - 1) called in that order. Read moreSource§fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
A and uses this to
map DIMENSION F elements to an element of A. Read moreSource§fn flatten_to_base(vec: Vec<F>) -> Vec<F>
fn flatten_to_base(vec: Vec<F>) -> Vec<F>
Source§fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
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§impl<F> ExtensionField<F> for Fwhere
F: Field,
impl<F> ExtensionField<F> for Fwhere
F: Field,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<F> PackedField for Fwhere
F: Field,
impl<F> PackedField for Fwhere
F: Field,
type Scalar = F
Source§fn packed_powers(base: Self::Scalar) -> Powers<Self>
fn packed_powers(base: Self::Scalar) -> Powers<Self>
base packed into packed field elements. Read moreSource§impl<F> PackedFieldPow2 for Fwhere
F: Field,
impl<F> PackedFieldPow2 for Fwhere
F: Field,
Source§impl<T> PackedValue for Twhere
T: Packable,
impl<T> PackedValue for Twhere
T: Packable,
Source§fn from_slice(slice: &[<T as PackedValue>::Value]) -> &T
fn from_slice(slice: &[<T as PackedValue>::Value]) -> &T
Source§fn from_slice_mut(slice: &mut [<T as PackedValue>::Value]) -> &mut T
fn from_slice_mut(slice: &mut [<T as PackedValue>::Value]) -> &mut T
Source§fn from_fn<Fn>(f: Fn) -> T
fn from_fn<Fn>(f: Fn) -> T
Source§fn as_slice(&self) -> &[<T as PackedValue>::Value]
fn as_slice(&self) -> &[<T as PackedValue>::Value]
Source§fn as_slice_mut(&mut self) -> &mut [<T as PackedValue>::Value]
fn as_slice_mut(&mut self) -> &mut [<T as PackedValue>::Value]
Source§fn pack_slice(buf: &[Self::Value]) -> &[Self]
fn pack_slice(buf: &[Self::Value]) -> &[Self]
Source§fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])
fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])
Source§fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]
fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]
Source§fn pack_maybe_uninit_slice_mut(
buf: &mut [MaybeUninit<Self::Value>],
) -> &mut [MaybeUninit<Self>]
fn pack_maybe_uninit_slice_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> &mut [MaybeUninit<Self>]
Source§fn pack_slice_with_suffix_mut(
buf: &mut [Self::Value],
) -> (&mut [Self], &mut [Self::Value])
fn pack_slice_with_suffix_mut( buf: &mut [Self::Value], ) -> (&mut [Self], &mut [Self::Value])
Source§fn pack_maybe_uninit_slice_with_suffix_mut(
buf: &mut [MaybeUninit<Self::Value>],
) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])
fn pack_maybe_uninit_slice_with_suffix_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])
Source§fn unpack_slice(buf: &[Self]) -> &[Self::Value]
fn unpack_slice(buf: &[Self]) -> &[Self::Value]
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<F> QuotientMap<isize> for Fwhere
F: QuotientMap<i8> + QuotientMap<i16> + QuotientMap<i32> + QuotientMap<i64> + QuotientMap<i128>,
impl<F> QuotientMap<isize> for Fwhere
F: QuotientMap<i8> + QuotientMap<i16> + QuotientMap<i32> + QuotientMap<i64> + QuotientMap<i128>,
Source§fn from_int(int: isize) -> F
fn from_int(int: isize) -> F
We use the from_int method of the primitive integer type identical to isize on this machine
Source§fn from_canonical_checked(int: isize) -> Option<F>
fn from_canonical_checked(int: isize) -> Option<F>
We use the from_canonical_checked method of the primitive integer type identical to isize on this machine
Source§unsafe fn from_canonical_unchecked(int: isize) -> F
unsafe fn from_canonical_unchecked(int: isize) -> F
We use the from_canonical_unchecked method of the primitive integer type identical to isize on this machine
Source§impl<F> QuotientMap<usize> for Fwhere
F: QuotientMap<u8> + QuotientMap<u16> + QuotientMap<u32> + QuotientMap<u64> + QuotientMap<u128>,
impl<F> QuotientMap<usize> for Fwhere
F: QuotientMap<u8> + QuotientMap<u16> + QuotientMap<u32> + QuotientMap<u64> + QuotientMap<u128>,
Source§fn from_int(int: usize) -> F
fn from_int(int: usize) -> F
We use the from_int method of the primitive integer type identical to usize on this machine
Source§fn from_canonical_checked(int: usize) -> Option<F>
fn from_canonical_checked(int: usize) -> Option<F>
We use the from_canonical_checked method of the primitive integer type identical to usize on this machine
Source§unsafe fn from_canonical_unchecked(int: usize) -> F
unsafe fn from_canonical_unchecked(int: usize) -> F
We use the from_canonical_unchecked method of the primitive integer type identical to usize on this machine