pub trait SumcheckEvaluator<P: PackedField, Composition> {
// Required methods
fn eval_point_indices(&self) -> Range<usize>;
fn process_subcube_at_eval_point(
&self,
subcube_vars: usize,
subcube_index: usize,
is_infinity_point: bool,
batch_query: &RowsBatchRef<'_, P>,
) -> P;
fn composition(&self) -> &Composition;
fn eq_ind_partial_eval(&self) -> Option<&[P]>;
// Provided methods
fn process_constant_eval_suffix(
&self,
_const_eval_suffix: usize,
_is_infinity_point: bool,
) -> P::Scalar { ... }
fn const_eval_suffix(&self) -> usize { ... }
}
Required Methods§
Sourcefn eval_point_indices(&self) -> Range<usize>
fn eval_point_indices(&self) -> Range<usize>
The range of eval point indices over which composition evaluation and summation should happen.
Returned range must equal the result of n_round_evals()
in length.
Sourcefn process_subcube_at_eval_point(
&self,
subcube_vars: usize,
subcube_index: usize,
is_infinity_point: bool,
batch_query: &RowsBatchRef<'_, P>,
) -> P
fn process_subcube_at_eval_point( &self, subcube_vars: usize, subcube_index: usize, is_infinity_point: bool, batch_query: &RowsBatchRef<'_, P>, ) -> P
Compute composition evals over a subcube.
batch_query
should contain multilinears evals over a subcube represented
by subcube_vars
and subcube_index
.
See doc comments to EvaluationDomain for the intuition
behind is_infinity_point
.
Returns a packed sum (which may be spread across scalars).
Sourcefn composition(&self) -> &Composition
fn composition(&self) -> &Composition
Returns the composition evaluated by this object.
Sourcefn eq_ind_partial_eval(&self) -> Option<&[P]>
fn eq_ind_partial_eval(&self) -> Option<&[P]>
In case of zerocheck returns eq_ind that the results should be folded with. In case of sumcheck returns None.
Provided Methods§
Sourcefn process_constant_eval_suffix(
&self,
_const_eval_suffix: usize,
_is_infinity_point: bool,
) -> P::Scalar
fn process_constant_eval_suffix( &self, _const_eval_suffix: usize, _is_infinity_point: bool, ) -> P::Scalar
Compute sum of evals over the suffix where the composite is guaranteed to evaluate to a constant.
It is assumed that all required inputs are known at the evaluator creation time, as const_eval_suffix
is
determined dynamically by the sumcheck round calculator and may be smaller than the return value of the method
with the same name.
See doc comments to EvaluationDomain for the intuition
behind is_infinity_point
.
Sourcefn const_eval_suffix(&self) -> usize
fn const_eval_suffix(&self) -> usize
Trace suffix where the composite is guaranteed to evaluate to a constant. The non-constant prefix
would get processed via process_subcube_at_eval_point
, whereas the remainder gets handled via
process_constant_eval_suffix
. Due to the fact that sumcheck operates over whole subcubes the
const_eval_suffix
passed to process_constant_eval_suffix
may be smaller that the return value
of this method.