Documentation ¶
Index ¶
- func IsPolyEqual(a []gmcl.Fr, b []gmcl.Fr) bool
- func IsPolyZero(a []gmcl.Fr) bool
- func PolyAdd(a []gmcl.Fr, b []gmcl.Fr) []gmcl.Fr
- func PolyCondense(a []gmcl.Fr) []gmcl.Fr
- func PolyDiv(A []gmcl.Fr, B []gmcl.Fr) ([]gmcl.Fr, []gmcl.Fr)
- func PolyLongDiv(A []gmcl.Fr, B []gmcl.Fr) []gmcl.Fr
- func PolyMul(a []gmcl.Fr, b []gmcl.Fr) []gmcl.Fr
- func PolySub(a []gmcl.Fr, b []gmcl.Fr) []gmcl.Fr
- func ReverseBitOrderFr(values []gmcl.Fr)
- func ReverseBitOrderFrPtr(values []*gmcl.Fr)
- func ReverseBitsLimited(length uint32, value uint32) uint32
- type FFTSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPolyEqual ¶
Returns true if polynomial A is a equal to polynomial B.
func IsPolyZero ¶
Returns true if polynomial A is a zero polynomial.
func PolyAdd ¶
Computes the standard polynomial addition, polynomial A + polynomial B, and stores result in polynomial C.
func PolyCondense ¶
Removes extraneous zero entries from in vector representation of polynomial. Example - Degree-4 Polynomial: [0, 1, 2, 3, 4, 0, 0, 0, 0] -> [0, 1, 2, 3, 4] Note: Simplest condensed form is a zero polynomial of vector form: [0]
func PolyLongDiv ¶
Long polynomial division for two polynomials in coefficient form Need to check divide by zero
func PolySub ¶
Computes the standard polynomial subtraction, polynomial A - polynomial B, and stores result in polynomial C.
func ReverseBitOrderFr ¶
rearrange Fr elements in reverse bit order. Supports 2**31 max element count.
func ReverseBitOrderFrPtr ¶
rearrange Fr ptr elements in reverse bit order. Supports 2**31 max element count.
func ReverseBitsLimited ¶
Types ¶
type FFTSettings ¶
type FFTSettings struct { MaxWidth uint64 // the generator used to get all roots of unity RootOfUnity *gmcl.Fr // domain, starting and ending with 1 (duplicate!) ExpandedRootsOfUnity []gmcl.Fr // reverse domain, same as inverse values of domain. Also starting and ending with 1. ReverseRootsOfUnity []gmcl.Fr }
func NewFFTSettings ¶
func NewFFTSettings(maxScale uint8) *FFTSettings