This crate implements traits and implementations for polynomials, FFT-friendly subsets of a field (dubbed "domains"), and FFTs for these domains.
The polynomial module provides the following traits for defining polynomials:
Polynomial: Requires implementors to support common operations on polynomials, such asAdd,Sub,Zero, evaluation at a point, degree, etc, and defines methods to serialize to and from the coefficient representation of the polynomial.UVPolynomial: Specifies that aPolynomialis actually a univariate polynomial.MVPolynomial: Specifies that aPolynomialis actually a multivariate polynomial.
This crate also provides the following data structures that implement these traits:
univariate/DensePolynomial: Represents degreedunivariate polynomials via a list ofd + 1coefficients. This struct implements theUVPolynomialtrait.univariate/SparsePolynomial: Represents degreedunivariate polynomials via a list containing all non-zero monomials. This should only be used when most coefficients of the polynomial are zero. This struct implements thePolynomialtrait (but not theUVPolynomialtrait).multivariate/SparsePolynomial: Represents multivariate polynomials via a list containing all non-zero monomials.
This crate also provides the univariate/DenseOrSparsePolynomial enum, which allows the user to abstract over the type of underlying univariate polynomial (dense or sparse).
TODO