[][src]Struct dusk_plonk::fft::EvaluationDomain

pub struct EvaluationDomain {
    pub size: u64,
    pub log_size_of_group: u32,
    pub size_as_field_element: Scalar,
    pub size_inv: Scalar,
    pub group_gen: Scalar,
    pub group_gen_inv: Scalar,
    pub generator_inv: Scalar,
}

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: Scalar

Size of the domain as a field element.

size_inv: Scalar

Inverse of the size in the field.

group_gen: Scalar

A generator of the subgroup.

group_gen_inv: Scalar

Inverse of the generator of the subgroup.

generator_inv: Scalar

Multiplicative generator of the finite field.

Implementations

impl EvaluationDomain[src]

pub fn new(num_coeffs: usize) -> Result<Self, Error>[src]

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

pub fn compute_size_of_domain(num_coeffs: usize) -> Option<usize>[src]

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

pub fn size(&self) -> usize[src]

Return the size of self.

pub fn fft(&self, coeffs: &[Scalar]) -> Vec<Scalar>[src]

Compute a FFT.

pub fn fft_in_place(&self, coeffs: &mut Vec<Scalar>)[src]

Compute a FFT, modifying the vector in place.

pub fn ifft(&self, evals: &[Scalar]) -> Vec<Scalar>[src]

Compute an IFFT.

pub fn ifft_in_place(&self, evals: &mut Vec<Scalar>)[src]

Compute an IFFT, modifying the vector in place.

pub fn coset_fft(&self, coeffs: &[Scalar]) -> Vec<Scalar>[src]

Compute a FFT over a coset of the domain.

pub fn coset_fft_in_place(&self, coeffs: &mut Vec<Scalar>)[src]

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

pub fn coset_ifft(&self, evals: &[Scalar]) -> Vec<Scalar>[src]

Compute an IFFT over a coset of the domain.

pub fn coset_ifft_in_place(&self, evals: &mut Vec<Scalar>)[src]

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

pub fn evaluate_all_lagrange_coefficients(&self, tau: Scalar) -> Vec<Scalar>[src]

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

pub fn evaluate_vanishing_polynomial(&self, tau: &Scalar) -> Scalar[src]

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

pub fn compute_vanishing_poly_over_coset(&self, poly_degree: u64) -> Evaluations[src]

Given that the domain size is D
This function computes the D evaluation points for the vanishing polynomial of degree n over a coset

pub fn elements(&self) -> Elements[src]

Return an iterator over the elements of the domain.

pub fn divide_by_vanishing_poly_on_coset_in_place(&self, evals: &mut [Scalar])[src]

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

pub fn reindex_by_subdomain(&self, other: Self, index: usize) -> usize[src]

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.

Panics

When the index of self is smaller than the other provided.

#[must_use]pub fn mul_polynomials_in_evaluation_domain(
    &self,
    self_evals: &[Scalar],
    other_evals: &[Scalar]
) -> Vec<Scalar>
[src]

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.

Assumes that the domain is large enough to allow for successful interpolation after multiplication.

Trait Implementations

impl Clone for EvaluationDomain[src]

impl Copy for EvaluationDomain[src]

impl Debug for EvaluationDomain[src]

impl Eq for EvaluationDomain[src]

impl PartialEq<EvaluationDomain> for EvaluationDomain[src]

impl StructuralEq for EvaluationDomain[src]

impl StructuralPartialEq for EvaluationDomain[src]

Auto Trait Implementations

impl RefUnwindSafe for EvaluationDomain

impl Send for EvaluationDomain

impl Sync for EvaluationDomain

impl Unpin for EvaluationDomain

impl UnwindSafe for EvaluationDomain

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,