birkhoffinterpolation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrEqualOrLargerThreshold is returned if threshold is equal or larger than the length of Bk parameters
	ErrEqualOrLargerThreshold = errors.New("equal or larger threshold")
	//ErrInvalidBks is returned if it exists a pair of invalid bks
	ErrInvalidBks = errors.New("invalid bks")
	//ErrNoValidBks is returned if there's no valid bk
	ErrNoValidBks = errors.New("no valid bks")
)

Functions

This section is empty.

Types

type BkParameter

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

func NewBkParameter

func NewBkParameter(x *big.Int, rank uint32) *BkParameter

func (*BkParameter) GetLinearEquationCoefficient

func (p *BkParameter) GetLinearEquationCoefficient(fieldOrder *big.Int, degreePoly uint32) []*big.Int

func (*BkParameter) GetRank

func (p *BkParameter) GetRank() uint32

func (*BkParameter) GetX

func (p *BkParameter) GetX() *big.Int

func (*BkParameter) String

func (p *BkParameter) String() string

func (*BkParameter) ToMessage

func (p *BkParameter) ToMessage() *BkParameterMessage

type BkParameterMessage

type BkParameterMessage struct {
	X                    []byte   `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
	Rank                 uint32   `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BkParameterMessage) Descriptor

func (*BkParameterMessage) Descriptor() ([]byte, []int)

func (*BkParameterMessage) GetRank

func (m *BkParameterMessage) GetRank() uint32

func (*BkParameterMessage) GetX

func (m *BkParameterMessage) GetX() []byte

func (*BkParameterMessage) ProtoMessage

func (*BkParameterMessage) ProtoMessage()

func (*BkParameterMessage) Reset

func (m *BkParameterMessage) Reset()

func (*BkParameterMessage) String

func (m *BkParameterMessage) String() string

func (*BkParameterMessage) ToBk

func (p *BkParameterMessage) ToBk() *BkParameter

func (*BkParameterMessage) XXX_DiscardUnknown

func (m *BkParameterMessage) XXX_DiscardUnknown()

func (*BkParameterMessage) XXX_Marshal

func (m *BkParameterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BkParameterMessage) XXX_Merge

func (m *BkParameterMessage) XXX_Merge(src proto.Message)

func (*BkParameterMessage) XXX_Size

func (m *BkParameterMessage) XXX_Size() int

func (*BkParameterMessage) XXX_Unmarshal

func (m *BkParameterMessage) XXX_Unmarshal(b []byte) error

type BkParameters

type BkParameters []*BkParameter

func (BkParameters) CheckValid

func (bks BkParameters) CheckValid(threshold uint32, fieldOrder *big.Int) error

func (BkParameters) ComputeBkCoefficient

func (bks BkParameters) ComputeBkCoefficient(threshold uint32, fieldOrder *big.Int) ([]*big.Int, error)

ComputeBkCoefficient returns the bk coefficients from parameters

func (BkParameters) Len

func (bks BkParameters) Len() int

func (BkParameters) Less

func (bks BkParameters) Less(i, j int) bool

Compare rank and then x Let bk := (rank, x). Then if (rank1, x1) > (rank2,x2) iff rank1<rank2 or ( rank1=rank2 and x1>x2)

func (BkParameters) Swap

func (bks BkParameters) Swap(i, j int)

Jump to

Keyboard shortcuts

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