Documentation ¶
Index ¶
- func BatchInterpolate(polys [][]field.Element, x fr.Element, oncoset ...bool) []field.Element
- func EvalXnMinusOneOnACoset(n, N int) []field.Element
- func Interpolate(poly []field.Element, x fr.Element, oncoset ...bool) field.Element
- func InterpolateGnark(api frontend.API, poly []frontend.Variable, x frontend.Variable) frontend.Variable
- func MultModXMinus1(domain *fft.Domain, res, a, b []field.Element)
- func MultModXnMinus1Precomputed(domain *fft.Domain, res, a, precomp []field.Element)
- func ReEvaluateOnLargerDomainCoset(poly []field.Element, newLen int) []field.Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchInterpolate ¶
Batch version of Interpolate
func EvalXnMinusOneOnACoset ¶
Evaluation x^n - 1 for x on a coset of domain of size N
N is the size of the larger domain n Is the size of the smaller domain
The result is (in theory) of size N, but it has a periodicity of r = N/n. Thus, we only return the "r" first entries
Largely inspired from gnark's https://github.com/ConsenSys/gnark/blob/8bc13b200cb9aa1ec74e4f4807e2e97fc8d8396f/internal/backend/bls12-377/plonk/prove.go#L734
func Interpolate ¶
Given the evaluations of a polynomial on a domain (whose size must be a power of two, or panic), return an evaluation at a chosen x.
As an input the user can specify that the inputs are given on a coset.
func InterpolateGnark ¶
func InterpolateGnark(api frontend.API, poly []frontend.Variable, x frontend.Variable) frontend.Variable
Evaluate a polynomial in lagrange basis on a gnark circuit
func MultModXMinus1 ¶
Multiply twi polynomial modulo X^n - 1 a and b must be in coefficient form, the result is in coefficient form a and b are destroyed during the operation
func MultModXnMinus1Precomputed ¶
Multiply two polynomials modulo X^n - 1 `a` must be in coefficient form `precomp` must be in evaluation form over the domain (DIT) `res` can be either `a` or any pre-allocated array res must pre-allocated in all cases a is destroyed during the operation
func ReEvaluateOnLargerDomainCoset ¶
Given a polynomial in standard order evaluation form. Return the evaluations on a coset of a larger domain. If the factor is not a power of two. The output is a vector of evaluation
Types ¶
This section is empty.