Documentation ¶
Index ¶
- func NewPeriodicSample(period, offset int) *symbolic.Expression
- func NewXVar() *symbolic.Expression
- type PeriodicSample
- func (t PeriodicSample) EvalAtOnDomain(pos int) field.Element
- func (t PeriodicSample) EvalAtOutOfDomain(size int, x field.Element) field.Element
- func (t PeriodicSample) EvalCoset(size, cosetId, cosetRatio int, shiftGen bool) sv.SmartVector
- func (t PeriodicSample) GnarkEvalAtOnDomain(api frontend.API, pos int) frontend.Variable
- func (t PeriodicSample) GnarkEvalAtOutOfDomain(api frontend.API, size int, x frontend.Variable) frontend.Variable
- func (t PeriodicSample) GnarkEvalNoCoset(size int) []frontend.Variable
- func (t PeriodicSample) String() string
- type X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPeriodicSample ¶
func NewPeriodicSample(period, offset int) *symbolic.Expression
Constructs a new PeriodicSample, will panic if the offset it larger than T
Types ¶
type PeriodicSample ¶
Refers to an abstract value that is 0 on every entries and one on every entries i such that i % T == 0
func (PeriodicSample) EvalAtOnDomain ¶
func (t PeriodicSample) EvalAtOnDomain(pos int) field.Element
func (PeriodicSample) EvalAtOutOfDomain ¶
Evaluates the expression outside of the domain
func (PeriodicSample) EvalCoset ¶
func (t PeriodicSample) EvalCoset(size, cosetId, cosetRatio int, shiftGen bool) sv.SmartVector
Returns an evaluation of the periodic sample (possibly) over a coset. To not push it over a coset : pass EvalCoset(size, 0, {0,1}, false)
func (PeriodicSample) GnarkEvalAtOnDomain ¶
Evaluate a particular position on the domain
func (PeriodicSample) GnarkEvalAtOutOfDomain ¶
func (PeriodicSample) GnarkEvalNoCoset ¶
func (t PeriodicSample) GnarkEvalNoCoset(size int) []frontend.Variable
Returns the result in gnark form. This returns a vector of constant on the form of frontend.Variables.
func (PeriodicSample) String ¶
func (t PeriodicSample) String() string
to implement symbolic.Metadata
type X ¶
type X struct{}
Refers to an abstract variable X over which all polynomials are defined.
func (X) EvalCoset ¶
func (x X) EvalCoset(size, cosetId, cosetRatio int, shiftGen bool) sv.SmartVector
Returns an evaluation of the X, possibly over a coset. Pass `EvalCoset(size, 0, 0, false)` to directly evaluate over a coset
func (X) GnarkEvalNoCoset ¶
Evaluate the variable, but not over a coset