logderivprecomp

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logderivprecomp allows computing functions using precomputation.

Instead of computing binary functions and checking that the result is correctly constrained, we instead can precompute all valid values of a function and then perform lookup to obtain the result. For example, for the XOR function we would naively otherwise have to split the inputs into bits, XOR one-by-one and recombine.

With this package, we can instead compute all results for two inputs of length 8 bit and then just perform a lookup on the inputs.

We use the logderivarg package for the actual log-derivative argument.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Precomputed

type Precomputed struct {
	// contains filtered or unexported fields
}

Precomputed holds all precomputed function values and queries.

func New

func New(api frontend.API, fn solver.Hint, rets []uint) (*Precomputed, error)

New returns a new Precomputed. It defers the log-derivative argument.

func (*Precomputed) Query

func (t *Precomputed) Query(x, y frontend.Variable) []frontend.Variable

Query

Jump to

Keyboard shortcuts

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