big_polynomial

package
v0.0.0-...-05508b9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolynomialClient

type PolynomialClient struct {
	// contains filtered or unexported fields
}

func New

func New(prime *big.Int) *PolynomialClient

func (*PolynomialClient) Add

func (pc *PolynomialClient) Add(a []*big.Int, b []*big.Int) []*big.Int

对2个多项式进行加法操作

func (*PolynomialClient) Evaluate

func (pc *PolynomialClient) Evaluate(polynomialCoefficients []*big.Int, specifiedValue *big.Int) *big.Int

Given the specified value, get the compution result of the polynomial 给出指定x值,计算出指定多项式f(x)的值

func (*PolynomialClient) GetLagrangeBasePolynomial

func (pc *PolynomialClient) GetLagrangeBasePolynomial(xs []*big.Int, xpos int) []*big.Int

获取拉格朗日基本多项式(插值基函数)

func (*PolynomialClient) GetPolynomialByPoints

func (pc *PolynomialClient) GetPolynomialByPoints(points map[int]*big.Int) []*big.Int

利用Lagrange Polynomial Interpolation Formula,通过给定坐标点集合来计算多项式

func (*PolynomialClient) Multiply

func (pc *PolynomialClient) Multiply(a []*big.Int, b []*big.Int) []*big.Int

对2个多项式进行乘法操作

func (*PolynomialClient) RandomGenerate

func (pc *PolynomialClient) RandomGenerate(degree int, secret []byte) ([]*big.Int, error)

make a random polynomials F(x) of Degree [degree], and the const(X-Intercept) is [intercept] 给定最高次方和x截距,生成一个系数随机的多项式

func (*PolynomialClient) Scale

func (pc *PolynomialClient) Scale(a []*big.Int, k *big.Int) []*big.Int

将1个多项式与指定系数k进行乘法操作

Jump to

Keyboard shortcuts

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