variables

package
v0.0.0-...-50d4516 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func NewXVar

func NewXVar() *symbolic.Expression

Construct a new variable for coin

Types

type PeriodicSample

type PeriodicSample struct {
	T      int
	Offset int // Should be < T
}

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

func (t PeriodicSample) EvalAtOutOfDomain(size int, x field.Element) field.Element

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

func (t PeriodicSample) GnarkEvalAtOnDomain(api frontend.API, pos int) frontend.Variable

Evaluate a particular position on the domain

func (PeriodicSample) GnarkEvalAtOutOfDomain

func (t PeriodicSample) GnarkEvalAtOutOfDomain(api frontend.API, size int, x frontend.Variable) frontend.Variable

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

func (x X) GnarkEvalNoCoset(size int) []frontend.Variable

Evaluate the variable, but not over a coset

func (X) String

func (x X) String() string

to implement symbolic.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL