2 unstable releases
0.3.0  Jun 6, 2021 

0.2.0  Mar 24, 2021 
#926 in Cryptography
35,755 downloads per month
Used in 23 crates
(15 directly)
435KB
10K
SLoC
arkpoly
This crate implements traits and implementations for polynomials, FFTfriendly subsets of a field (dubbed "domains"), and FFTs for these domains.
Polynomials
The polynomial
module provides the following traits for defining polynomials in coefficient form:
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 aPolynomial
is actually a univariate polynomial.MVPolynomial
: Specifies that aPolynomial
is actually a multivariate polynomial.
This crate also provides the following data structures that implement these traits:
univariate/DensePolynomial
: Represents degreed
univariate polynomials via a list ofd + 1
coefficients. This struct implements theUVPolynomial
trait.univariate/SparsePolynomial
: Represents degreed
univariate polynomials via a list containing all nonzero monomials. This should only be used when most coefficients of the polynomial are zero. This struct implements thePolynomial
trait (but not theUVPolynomial
trait).multivariate/SparsePolynomial
: Represents multivariate polynomials via a list containing all nonzero 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).
Evaluations
The evaluations
module provides data structures to represent univariate polynomials in lagrange form.
univariate/Evaluations
Represents a univariate polynomial in evaluation form, which can be used for FFT.
The evaluations
module also provides the following traits for defining multivariate polynomials in lagrange form:
multivariate/multilinear/MultilinearExtension
Specifies a multilinear polynomial evaluated over boolean hypercube.
This crate provides some data structures to implement these traits.

multivariate/multilinear/DenseMultilinearExtension
Represents multilinear extension via a list of evaluations over boolean hypercube. 
multivariate/multilinear/SparseMultilinearExtension
Represents multilinear extension via a list of nonzero evaluations over boolean hypercube.
Domains
TODO
Dependencies
~2.1–3MB
~65K SLoC