|
| | Polynomial (size_t initial_size) |
| | Initialize a Polynomial to size 'initial_size', zeroing memory.
|
| |
| | Polynomial (size_t initial_size, DontZeroMemory flag) |
| | Initialize a Polynomial to size 'initial_size'. Important: This does NOT zero memory.
|
| |
|
| Polynomial (const Polynomial &other) |
| |
|
| Polynomial (const Polynomial &other, size_t target_size) |
| |
|
| Polynomial (Polynomial &&other) noexcept |
| |
|
| Polynomial (std::span< const Fr > coefficients) |
| |
| | Polynomial (std::span< const Fr > interpolation_points, std::span< const Fr > evaluations) |
| | Create the degree-(m-1) polynomial T(X) that interpolates the given evaluations. We have T(xⱼ) = yⱼ for j=1,...,m.
|
| |
|
Polynomial & | operator= (Polynomial &&other) noexcept |
| |
|
Polynomial & | operator= (std::span< const Fr > coefficients) noexcept |
| |
|
Polynomial & | operator= (const Polynomial &other) |
| |
| Polynomial | share () const |
| |
|
std::array< uint8_t, 32 > | hash () const |
| |
|
void | clear () |
| |
|
bool | operator== (Polynomial const &rhs) const |
| |
|
Fr const & | operator[] (const size_t i) const |
| |
|
Fr & | operator[] (const size_t i) |
| |
|
Fr const & | at (const size_t i) const |
| |
|
Fr & | at (const size_t i) |
| |
|
Fr | evaluate (const Fr &z, size_t target_size) const |
| |
|
Fr | evaluate (const Fr &z) const |
| |
|
Fr | compute_barycentric_evaluation (const Fr &z, const EvaluationDomain< Fr > &domain) |
| |
|
Fr | evaluate_from_fft (const EvaluationDomain< Fr > &large_domain, const Fr &z, const EvaluationDomain< Fr > &small_domain) |
| |
| void | fft (const EvaluationDomain< Fr > &domain) |
| |
|
void | partial_fft (const EvaluationDomain< Fr > &domain, Fr constant=1, bool is_coset=false) |
| |
|
void | coset_fft (const EvaluationDomain< Fr > &domain) |
| |
|
void | coset_fft (const EvaluationDomain< Fr > &domain, const EvaluationDomain< Fr > &large_domain, size_t domain_extension) |
| |
|
void | coset_fft_with_constant (const EvaluationDomain< Fr > &domain, const Fr &constant) |
| |
|
void | coset_fft_with_generator_shift (const EvaluationDomain< Fr > &domain, const Fr &constant) |
| |
|
void | ifft (const EvaluationDomain< Fr > &domain) |
| |
|
void | ifft_with_constant (const EvaluationDomain< Fr > &domain, const Fr &constant) |
| |
|
void | coset_ifft (const EvaluationDomain< Fr > &domain) |
| |
|
Fr | compute_kate_opening_coefficients (const Fr &z) |
| |
|
bool | is_empty () const |
| |
| Polynomial | shifted () const |
| | Returns an std::span of the left-shift of self.
|
| |
| void | set_to_right_shifted (std::span< Fr > coeffs_in, size_t shift_size=1) |
| | Set self to the right shift of input coefficients.
|
| |
| void | add_scaled (std::span< const Fr > other, Fr scaling_factor) |
| | adds the polynomial q(X) 'other', multiplied by a scaling factor.
|
| |
| Polynomial & | operator+= (std::span< const Fr > other) |
| | adds the polynomial q(X) 'other'.
|
| |
| Polynomial & | operator-= (std::span< const Fr > other) |
| | subtracts the polynomial q(X) 'other'.
|
| |
| Polynomial & | operator*= (Fr scaling_factor) |
| | sets this = p(X) to s⋅p(X)
|
| |
| Fr | evaluate_mle (std::span< const Fr > evaluation_points, bool shift=false) const |
| | evaluates p(X) = ∑ᵢ aᵢ⋅Xⁱ considered as multi-linear extension p(X₀,…,Xₘ₋₁) = ∑ᵢ aᵢ⋅Lᵢ(X₀,…,Xₘ₋₁) at u = (u₀,…,uₘ₋₁)
|
| |
| Polynomial< Fr > | partial_evaluate_mle (std::span< const Fr > evaluation_points) const |
| | Partially evaluates in the last k variables a polynomial interpreted as a multilinear extension.
|
| |
| void | factor_roots (std::span< const Fr > roots) |
| | Divides p(X) by (X-r₁)⋯(X−rₘ) in-place. Assumes that p(rⱼ)=0 for all j.
|
| |
|
void | factor_roots (const Fr &root) |
| |
|
iterator | begin () |
| |
|
iterator | end () |
| |
|
pointer | data () |
| |
|
std::span< uint8_t > | byte_span () const |
| |
|
const_iterator | begin () const |
| |
|
const_iterator | end () const |
| |
|
const_pointer | data () const |
| |
|
std::size_t | size () const |
| |
|
std::size_t | capacity () const |
| |
Partially evaluates in the last k variables a polynomial interpreted as a multilinear extension.
Partially evaluates p(X) = (a_0, ..., a_{2^n-1}) considered as multilinear extension p(X_0,…,X_{n-1}) = \sum_i a_i*L_i(X_0,…,X_{n-1}) at u = (u_0,…,u_{m-1}), m < n, in the last m variables X_n-m,…,X_{n-1}. The result is a multilinear polynomial in n-m variables g(X_0,…,X_{n-m-1})) = p(X_0,…,X_{n-m-1},u_0,...u_{m-1}).
- Note
- Intuitively, partially evaluating in one variable collapses the hypercube in one dimension, halving the number of coefficients needed to represent the result. To partially evaluate starting with the first variable (as is done in evaluate_mle), the vector of coefficents is halved by combining adjacent rows in a pairwise fashion (similar to what is done in Sumcheck via "edges"). To evaluate starting from the last variable, we instead bisect the whole vector and combine the two halves. I.e. rather than coefficents being combined with their immediate neighbor, they are combined with the coefficient that lives n/2 indices away.
- Parameters
-
| evaluation_points | an MLE partial evaluation point u = (u_0,…,u_{m-1}) |
- Returns
- Polynomial<Fr> g(X_0,…,X_{n-m-1})) = p(X_0,…,X_{n-m-1},u_0,...u_{m-1})