Documentation ¶
Index ¶
- func ArrayOfBigZeros(num int) []*big.Int
- func BigArraysEqual(a, b []*big.Int) bool
- func Transpose(matrix [][]*big.Int) [][]*big.Int
- type PolynomialField
- func (pf PolynomialField) Add(a, b []*big.Int) []*big.Int
- func (pf PolynomialField) CombinePolynomials(r []*big.Int, ap, bp, cp [][]*big.Int) ([]*big.Int, []*big.Int, []*big.Int, []*big.Int)
- func (pf PolynomialField) Div(a, b []*big.Int) ([]*big.Int, []*big.Int)
- func (pf PolynomialField) DivisorPolynomial(px, z []*big.Int) []*big.Int
- func (pf PolynomialField) Eval(v []*big.Int, x *big.Int) *big.Int
- func (pf PolynomialField) LagrangeInterpolation(v []*big.Int) []*big.Int
- func (pf PolynomialField) Mul(a, b []*big.Int) []*big.Int
- func (pf PolynomialField) NewPolZeroAt(pointPos, totalPoints int, height *big.Int) []*big.Int
- func (pf PolynomialField) R1CSToQAP(a, b, c [][]*big.Int) ([][]*big.Int, [][]*big.Int, [][]*big.Int, []*big.Int)
- func (pf PolynomialField) Sub(a, b []*big.Int) []*big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayOfBigZeros ¶
ArrayOfBigZeros creates a *big.Int array with n elements to zero
func BigArraysEqual ¶
Types ¶
type PolynomialField ¶
PolynomialField is the Polynomial over a Finite Field where the polynomial operations are performed
func NewPolynomialField ¶
func NewPolynomialField(f fields.Fq) PolynomialField
NewPolynomialField creates a new PolynomialField with the given FiniteField
func (PolynomialField) Add ¶
func (pf PolynomialField) Add(a, b []*big.Int) []*big.Int
Add adds two polinomials over the Finite Field
func (PolynomialField) CombinePolynomials ¶
func (pf PolynomialField) CombinePolynomials(r []*big.Int, ap, bp, cp [][]*big.Int) ([]*big.Int, []*big.Int, []*big.Int, []*big.Int)
CombinePolynomials combine the given polynomials arrays into one, also returns the P(x)
func (PolynomialField) Div ¶
Div divides two polinomials over the Finite Field, returning the result and the remainder
func (PolynomialField) DivisorPolynomial ¶
func (pf PolynomialField) DivisorPolynomial(px, z []*big.Int) []*big.Int
DivisorPolynomial returns the divisor polynomial given two polynomials
func (PolynomialField) Eval ¶
Eval evaluates the polinomial over the Finite Field at the given value x
func (PolynomialField) LagrangeInterpolation ¶
func (pf PolynomialField) LagrangeInterpolation(v []*big.Int) []*big.Int
LagrangeInterpolation performs the Lagrange Interpolation / Lagrange Polynomials operation
func (PolynomialField) Mul ¶
func (pf PolynomialField) Mul(a, b []*big.Int) []*big.Int
Mul multiplies two polinomials over the Finite Field
func (PolynomialField) NewPolZeroAt ¶
NewPolZeroAt generates a new polynomial that has value zero at the given value