pub struct Fft<F: FftField> {
pub elements: Vec<F>,
/* private fields */
}
Expand description
fft construction using n th root of unity supports polynomial operation less than n degree
Fields§
§elements: Vec<F>
Implementations§
Source§impl<F: FftField> Fft<F>
impl<F: FftField> Fft<F>
pub fn new(k: usize) -> Self
Sourcepub fn generator_inv(&self) -> F
pub fn generator_inv(&self) -> F
nth unity of root
Sourcepub fn dft(&self, coeffs: Coefficients<F>) -> PointsValue<F>
pub fn dft(&self, coeffs: Coefficients<F>) -> PointsValue<F>
perform discrete fourier transform
Sourcepub fn idft(&self, points: PointsValue<F>) -> Coefficients<F>
pub fn idft(&self, points: PointsValue<F>) -> Coefficients<F>
perform classic inverse discrete fourier transform
Sourcepub fn coset_dft(&self, coeffs: Coefficients<F>) -> PointsValue<F>
pub fn coset_dft(&self, coeffs: Coefficients<F>) -> PointsValue<F>
perform discrete fourier transform on coset
Sourcepub fn coset_idft(&self, points: PointsValue<F>) -> Coefficients<F>
pub fn coset_idft(&self, points: PointsValue<F>) -> Coefficients<F>
perform discrete fourier transform on coset
Sourcepub fn z(&self, tau: &F) -> F
pub fn z(&self, tau: &F) -> F
This evaluates t(tau) for this domain, which is tau^m - 1 for these radix-2 domains.
Sourcepub fn z_on_coset(&self) -> F
pub fn z_on_coset(&self) -> F
This evaluates t(tau) for this domain, which is tau^m - 1 for these radix-2 domains.
Sourcepub fn divide_by_z_on_coset(&self, points: PointsValue<F>) -> PointsValue<F>
pub fn divide_by_z_on_coset(&self, points: PointsValue<F>) -> PointsValue<F>
The target polynomial is the zero polynomial in our evaluation domain, so we must perform division over a coset.
Sourcepub fn poly_mul(
&self,
rhs: Coefficients<F>,
lhs: Coefficients<F>,
) -> Coefficients<F>
pub fn poly_mul( &self, rhs: Coefficients<F>, lhs: Coefficients<F>, ) -> Coefficients<F>
polynomial multiplication
Sourcepub fn evaluate_all_lagrange_coefficients(&self, tau: F) -> Vec<F>
pub fn evaluate_all_lagrange_coefficients(&self, tau: F) -> Vec<F>
Evaluate all the lagrange polynomials defined by this domain at the
point tau
.
Sourcepub fn compute_vanishing_poly_over_coset(
&self,
poly_degree: u64,
) -> PointsValue<F>
pub fn compute_vanishing_poly_over_coset( &self, poly_degree: u64, ) -> PointsValue<F>
Given that the domain size is D
This function computes the D
evaluation points for
the vanishing polynomial of degree n
over a coset
Trait Implementations§
impl<F: Eq + FftField> Eq for Fft<F>
impl<F: FftField> StructuralPartialEq for Fft<F>
Auto Trait Implementations§
impl<F> Freeze for Fft<F>where
F: Freeze,
impl<F> RefUnwindSafe for Fft<F>where
F: RefUnwindSafe,
impl<F> Send for Fft<F>
impl<F> Sync for Fft<F>
impl<F> Unpin for Fft<F>where
F: Unpin,
impl<F> UnwindSafe for Fft<F>where
F: UnwindSafe,
Blanket Implementations§
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<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 more