pub trait EvaluationDomain<F: BinaryField> {
// Required methods
fn lagrange_evals<E: FieldOps + From<F>>(&self, z: &E) -> Vec<E>;
fn lagrange_evals_buffer(&self, z: F) -> FieldBuffer<F>;
fn extrapolate<E: FieldOps + From<F>>(&self, values: &[E], z: &E) -> E;
}Expand description
Lagrange interpolation over a domain of 2^dim points.
Bring this into scope to read a BinarySubspace as the domain a polynomial is given on.
Every method carries two field parameters:
F the domain's own field, where the points live
E the field the arithmetic runs in, which F embeds intoA native verifier takes E = F.
A recursion verifier takes E to be its channel’s element type, so the same code builds a
circuit.
Required Methods§
Sourcefn lagrange_evals<E: FieldOps + From<F>>(&self, z: &E) -> Vec<E>
fn lagrange_evals<E: FieldOps + From<F>>(&self, z: &E) -> Vec<E>
The Lagrange basis evaluated at z, one value per domain point.
Entry i is L_i(z) = w * prod_{j != i} (z - d_j), for the shared weight w.
Sourcefn lagrange_evals_buffer(&self, z: F) -> FieldBuffer<F>
fn lagrange_evals_buffer(&self, z: F) -> FieldBuffer<F>
The Lagrange basis at z, packed into a buffer instead of a vector.
Same values as Self::lagrange_evals, for callers that feed a buffer-shaped consumer.
Sourcefn extrapolate<E: FieldOps + From<F>>(&self, values: &[E], z: &E) -> E
fn extrapolate<E: FieldOps + From<F>>(&self, values: &[E], z: &E) -> E
Evaluates at z the polynomial that takes values on this domain.
This is the inner product of values with Self::lagrange_evals, without building that
vector:
f(z) = w * sum_i values_i * prod_{j != i} (z - d_j)§Panics
Panics unless values holds one entry per domain point.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".