enum EvalResult<'a, F: FftField> {
Constant(F),
Evals {
domain: Domain,
evals: Evaluations<F, Radix2EvaluationDomain<F>>,
},
SubEvals {
domain: Domain,
shift: usize,
evals: &'a Evaluations<F, Radix2EvaluationDomain<F>>,
},
}Variants§
Constant(F)
Evals
SubEvals
SubEvals is used to refer to evaluations that can be trivially obtained from a
borrowed evaluation. In this case, by taking a subset of the entries
(specifically when the borrowed evals is over a superset of domain)
and shifting them
Implementations§
Source§impl<'a, F: FftField> EvalResult<'a, F>
Implement algebraic methods like add, sub, mul, square, etc to use
algebra on the type EvalResult.
impl<'a, F: FftField> EvalResult<'a, F>
Implement algebraic methods like add, sub, mul, square, etc to use
algebra on the type EvalResult.
Sourcefn init_<G: Sync + Send + Fn(usize) -> F>(
res_domain: (Domain, D<F>),
g: G,
) -> Evaluations<F, D<F>>
fn init_<G: Sync + Send + Fn(usize) -> F>( res_domain: (Domain, D<F>), g: G, ) -> Evaluations<F, D<F>>
Create an evaluation over the domain res_domain.
The second parameter, g, is a function used to define the
evaluations at a given point of the domain.
For instance, the second parameter g can simply be the identity
functions over a set of field elements.
It can also be used to define polynomials like x^2 when we only have the
value of x. It can be used in particular to evaluate an expression (a
multi-variate polynomial) when we only do have access to the evaluations
of the individual variables.
Sourcefn init<G: Sync + Send + Fn(usize) -> F>(
res_domain: (Domain, D<F>),
g: G,
) -> Self
fn init<G: Sync + Send + Fn(usize) -> F>( res_domain: (Domain, D<F>), g: G, ) -> Self
Call the internal function init_ and return the computed evaluation as
a value Evals.
fn add<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>
fn sub<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>
fn pow<'b>(self, d: u64, res_domain: (Domain, D<F>)) -> EvalResult<'b, F>
fn square<'b>(self, res_domain: (Domain, D<F>)) -> EvalResult<'b, F>
fn mul<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>
Trait Implementations§
Source§impl<'a, F: Clone + FftField> Clone for EvalResult<'a, F>
impl<'a, F: Clone + FftField> Clone for EvalResult<'a, F>
Source§fn clone(&self) -> EvalResult<'a, F>
fn clone(&self) -> EvalResult<'a, F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more