Struct snarkvm_wasm::EvaluationDomain[][src]

pub struct EvaluationDomain<F> where
    F: FftField
{ pub size: u64, pub log_size_of_group: u32, pub size_as_field_element: F, pub size_inv: F, pub group_gen: F, pub group_gen_inv: F, pub generator_inv: F, }
Expand description

Defines a domain over which finite field (I)FFTs can be performed. Works only for fields that have a large multiplicative subgroup of size that is a power-of-2.

Fields

size: u64

The size of the domain.

log_size_of_group: u32

log_2(self.size).

size_as_field_element: F

Size of the domain as a field element.

size_inv: F

Inverse of the size in the field.

group_gen: F

A generator of the subgroup.

group_gen_inv: F

Inverse of the generator of the subgroup.

generator_inv: F

Multiplicative generator of the finite field.

Implementations

Sample an element that is not in the domain.

Construct a domain that is large enough for evaluations of a polynomial having num_coeffs coefficients.

Return the size of a domain that is large enough for evaluations of a polynomial having num_coeffs coefficients.

Return the size of self.

Compute an FFT.

Compute an FFT, modifying the vector in place.

Compute an IFFT.

Compute an IFFT, modifying the vector in place.

Compute an FFT over a coset of the domain.

Compute an FFT over a coset of the domain, modifying the input vector in place.

Compute an IFFT over a coset of the domain.

Compute an IFFT over a coset of the domain, modifying the input vector in place.

Evaluate all the lagrange polynomials defined by this domain at the point tau.

Return the sparse vanishing polynomial.

This evaluates the vanishing polynomial for this domain at tau. For multiplicative subgroups, this polynomial is z(X) = X^self.size - 1.

Return an iterator over the elements of the domain.

The target polynomial is the zero polynomial in our evaluation domain, so we must perform division over a coset.

Given an index which assumes the first elements of this domain are the elements of another (sub)domain with size size_s, this returns the actual index into this domain.

Perform O(n) multiplication of two polynomials that are presented by their evaluations in the domain. Returns the evaluations of the product over the domain.

Computes the first self.size / 2 roots of unity.

Trait Implementations

Reads Self from reader.

Reads Self from reader without compression.

Serializes self into writer.

Serializes self into writer without compression.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Compare self to key and return true if they are equal.

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.