Documentation ¶
Overview ¶
Package polynomial provides polynomial methods and commitment schemes.
Index ¶
- type Polynomial
- func (p *Polynomial) Add(p1, p2 Polynomial) *Polynomial
- func (p *Polynomial) AddConstantInPlace(c *fr.Element)
- func (p *Polynomial) Clone() Polynomial
- func (p *Polynomial) Degree() uint64
- func (p *Polynomial) Equal(p1 Polynomial) bool
- func (p *Polynomial) Eval(v *fr.Element) fr.Element
- func (p *Polynomial) ScaleInPlace(c *fr.Element)
- func (p *Polynomial) SubConstantInPlace(c *fr.Element)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Polynomial ¶
Polynomial polynomial represented by coefficients bn254 fr field.
func (*Polynomial) Add ¶
func (p *Polynomial) Add(p1, p2 Polynomial) *Polynomial
Add adds p1 to p2 This function allocates a new slice unless p == p1 or p == p2
func (*Polynomial) AddConstantInPlace ¶
func (p *Polynomial) AddConstantInPlace(c *fr.Element)
AddConstantInPlace adds a constant to the polynomial, modifying p
func (*Polynomial) Clone ¶
func (p *Polynomial) Clone() Polynomial
Clone returns a copy of the polynomial
func (*Polynomial) Degree ¶
func (p *Polynomial) Degree() uint64
Degree returns the degree of the polynomial, which is the length of Data.
func (*Polynomial) Equal ¶
func (p *Polynomial) Equal(p1 Polynomial) bool
Equal checks equality between two polynomials
func (*Polynomial) Eval ¶
func (p *Polynomial) Eval(v *fr.Element) fr.Element
Eval evaluates p at v returns a fr.Element
func (*Polynomial) ScaleInPlace ¶
func (p *Polynomial) ScaleInPlace(c *fr.Element)
ScaleInPlace multiplies p by v, modifying p
func (*Polynomial) SubConstantInPlace ¶
func (p *Polynomial) SubConstantInPlace(c *fr.Element)
SubConstantInPlace subs a constant to the polynomial, modifying p
Click to show internal directories.
Click to hide internal directories.