Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MultiLin ¶
func (MultiLin) Evaluate ¶
Evaluate assumes len(m) = 1 << len(at) it doesn't modify m
Example ¶
const logSize = 20 const size = 1 << logSize m := MultiLin(make([]frontend.Variable, size)) e := MultiLin(make([]frontend.Variable, logSize)) cs, err := frontend.Compile(ecc.BN254.ScalarField(), r1cs.NewBuilder, &evalMultiLinCircuit{M: m, At: e, Evaluation: 0}) if err != nil { panic(err) } fmt.Println("r1cs size:", cs.GetNbConstraints()) cs, err = frontend.Compile(ecc.BN254.ScalarField(), scs.NewBuilder, &evalMultiLinCircuit{M: m, At: e, Evaluation: 0}) if err != nil { panic(err) } fmt.Println("scs size:", cs.GetNbConstraints())
Output: r1cs size: 1048627 scs size: 2097226
Click to show internal directories.
Click to hide internal directories.