Documentation ¶
Index ¶
- func Add(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, ...) (exponents.Interface, coefficients.Interface, error)
- func Multiply(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, ...) (exponents.Interface, coefficients.Interface, error)
- func Negate(cs coefficients.Interface, newCs coefficients.NewFunc) (coefficients.Interface, error)
- func Power(es exponents.Interface, cs coefficients.Interface, k *integer.Element, ...) (exponents.Interface, coefficients.Interface, error)
- func PowerInt64(es exponents.Interface, cs coefficients.Interface, k int64, ...) (exponents.Interface, coefficients.Interface, error)
- func ScalarMultiplyByCoefficient(a object.Element, es exponents.Interface, cs coefficients.Interface, ...) (exponents.Interface, coefficients.Interface, error)
- func ScalarMultiplyByInteger(n *integer.Element, es exponents.Interface, cs coefficients.Interface, ...) (exponents.Interface, coefficients.Interface, error)
- func Subtract(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, ...) (exponents.Interface, coefficients.Interface, error)
- func Sum(Es []exponents.Interface, Cs []coefficients.Interface, newEs exponents.NewFunc, ...) (exponents.Interface, coefficients.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, csg coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
Add returns the sum f + g, where f is the polynomial defined by the parallel slices esf and csf of exponents and coefficients, and similarly g is defined by esg and csg. The sum is returned as two parallel slices of exponents and coefficients.
func Multiply ¶
func Multiply(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, csg coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
Multiply returns the product f * g, where f is the polynomial defined by the parallel slices esf and csf of exponents and coefficients, and similarly g is defined by esg and csg. The product is returned as two parallel slices of exponents and coefficients.
func Negate ¶
func Negate(cs coefficients.Interface, newCs coefficients.NewFunc) (coefficients.Interface, error)
Negate returns the negation -f, where f is the polynomial defined by the slice cs of coefficients. The coefficients of -f will be returned.
func Power ¶
func Power(es exponents.Interface, cs coefficients.Interface, k *integer.Element, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
Power returns f^k. Here f is the polynomial defined by the parallel slices es and cs of exponents and coefficients. The power is returned as two parallel slices of exponents and coefficients.
func PowerInt64 ¶
func PowerInt64(es exponents.Interface, cs coefficients.Interface, k int64, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
PowerInt64 returns f^k. Here f is the polynomial defined by the parallel slices es and cs of exponents and coefficients. The power is returned as two parallel slices of exponents and coefficients.
func ScalarMultiplyByCoefficient ¶
func ScalarMultiplyByCoefficient(a object.Element, es exponents.Interface, cs coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
ScalarMultiplyByCoefficient returns a * f, where a is an element in the coefficient ring and f is the polynomial defined by the parallel slices es and cs of exponents and coefficients. The result is returned as two parallel slices of exponents and coefficients.
func ScalarMultiplyByInteger ¶
func ScalarMultiplyByInteger(n *integer.Element, es exponents.Interface, cs coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
ScalarMultiplyByInteger returns n * f, where this is defined to be f + ... + f (n times) if n is positive, -f - ... - f (|n| times) if n is negative, and 0 if n is zero. Here f is the polynomial defined by the parallel slices es and cs of exponents and coefficients. The result is returned as two parallel slices of exponents and coefficients.
func Subtract ¶
func Subtract(esf exponents.Interface, csf coefficients.Interface, esg exponents.Interface, csg coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
Subtract returns the difference f - g, where f is the polynomial defined by the parallel slices esf and csf of exponents and coefficients, and similarly g is defined by esg and csg. The difference is returned as two parallel slices of exponents and coefficients.
func Sum ¶
func Sum(Es []exponents.Interface, Cs []coefficients.Interface, newEs exponents.NewFunc, newCs coefficients.NewFunc) (exponents.Interface, coefficients.Interface, error)
Sum returns the sum of the polynomials described by the parallel slices Es and Cs, where the i-th entry Es[i] and Cs[i] in each slice are parallel slices describing the exponents and coefficients, respectively, of a polynomial. The sum is returned as two parallel slices of exponents and coefficients. The slices Es and Cs are assumed to be of the same length.
Types ¶
This section is empty.