polynomial

package
v0.0.0-...-ae8e47d Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalEq

func EvalEq(api frontend.API, x, y []frontend.Variable) (eq frontend.Variable)

EvalEq returns Πⁿ₁ Eq(xᵢ, yᵢ) = Πⁿ₁ xᵢyᵢ + (1-xᵢ)(1-yᵢ) = Πⁿ₁ (1 + 2xᵢyᵢ - xᵢ - yᵢ). Is assumes len(x) = len(y) =: n

func InterpolateLDE

func InterpolateLDE(api frontend.API, at frontend.Variable, values []frontend.Variable) frontend.Variable

InterpolateLDE fits a polynomial f of degree len(values)-1 such that f(i) = values[i] whenever defined. Returns f(at)

Types

type MultiLin

type MultiLin []frontend.Variable

func (MultiLin) Evaluate

func (m MultiLin) Evaluate(api frontend.API, at []frontend.Variable) frontend.Variable

Evaluate assumes len(m) = 1 << len(at)

func (MultiLin) NumVars

func (m MultiLin) NumVars() int

type Polynomial

type Polynomial []frontend.Variable

func (Polynomial) Eval

func (p Polynomial) Eval(api frontend.API, at frontend.Variable) (pAt frontend.Variable)

Jump to

Keyboard shortcuts

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