Documentation
¶
Index ¶
- type PolynomialClient
- func (pc *PolynomialClient) Add(a []*big.Int, b []*big.Int) []*big.Int
- func (pc *PolynomialClient) Evaluate(polynomialCoefficients []*big.Int, specifiedValue *big.Int) *big.Int
- func (pc *PolynomialClient) GetLagrangeBasePolynomial(xs []*big.Int, xpos int) []*big.Int
- func (pc *PolynomialClient) GetPolynomialByPoints(points map[int]*big.Int) []*big.Int
- func (pc *PolynomialClient) Multiply(a []*big.Int, b []*big.Int) []*big.Int
- func (pc *PolynomialClient) RandomGenerate(degree int, secret []byte) ([]*big.Int, error)
- func (pc *PolynomialClient) Scale(a []*big.Int, k *big.Int) []*big.Int
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) 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 (*PolynomialClient) GetPolynomialByPoints ¶
利用Lagrange Polynomial Interpolation Formula,通过给定坐标点集合来计算多项式
func (*PolynomialClient) RandomGenerate ¶
make a random polynomials F(x) of Degree [degree], and the const(X-Intercept) is [intercept] 给定最高次方和x截距,生成一个系数随机的多项式
Click to show internal directories.
Click to hide internal directories.