polynomial

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Overview

Package polynomial provides polynomial methods and commitment schemes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Polynomial

type Polynomial []fr.Element

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

Jump to

Keyboard shortcuts

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