cs

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoeffTable

type CoeffTable struct {
	Coefficients []fr.Element
	// contains filtered or unexported fields
}

CoeffTable ensure we store unique coefficients in the constraint system

func (*CoeffTable) AddCoeff

func (ct *CoeffTable) AddCoeff(coeff constraint.Element) uint32

func (*CoeffTable) CoeffToString

func (ct *CoeffTable) CoeffToString(cID int) string

CoeffToString implements constraint.Resolver

func (*CoeffTable) MakeTerm

func (ct *CoeffTable) MakeTerm(coeff constraint.Element, variableID int) constraint.Term

type R1CS

type R1CS = system

func NewR1CS

func NewR1CS(capacity int) *R1CS

type R1CSSolution

type R1CSSolution struct {
	W       fr.Vector
	A, B, C fr.Vector
}

R1CSSolution represent a valid assignment to all the variables in the constraint system. The vector W such that Aw o Bw - Cw = 0

func (*R1CSSolution) ReadFrom

func (t *R1CSSolution) ReadFrom(r io.Reader) (int64, error)

func (*R1CSSolution) WriteTo

func (t *R1CSSolution) WriteTo(w io.Writer) (int64, error)

type SparseR1CS

type SparseR1CS = system

func NewSparseR1CS

func NewSparseR1CS(capacity int) *SparseR1CS

type SparseR1CSSolution

type SparseR1CSSolution struct {
	L, R, O fr.Vector
}

SparseR1CSSolution represent a valid assignment to all the variables in the constraint system.

func (*SparseR1CSSolution) ReadFrom

func (t *SparseR1CSSolution) ReadFrom(r io.Reader) (int64, error)

func (*SparseR1CSSolution) WriteTo

func (t *SparseR1CSSolution) WriteTo(w io.Writer) (int64, error)

type UnsatisfiedConstraintError

type UnsatisfiedConstraintError struct {
	Err       error
	CID       int     // constraint ID
	DebugInfo *string // optional debug info
}

UnsatisfiedConstraintError wraps an error with useful metadata on the unsatisfied constraint

func (*UnsatisfiedConstraintError) Error

Jump to

Keyboard shortcuts

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