nzmath.poly.univar

SortedPolynomial

SortedPolynomial stores terms of a polynomial in sorted manner. All methods and operations keep it sorted.

This class inherits and implements PolynomialInterface.

Constructor

SortedPolynomial(coefficients [, _sorted [, keyword arguments..]])

coefficients can be any dict initial values. Optionally _sorted can be True if the coefficients is already sorted.

Methods

degree()

Return the degree of this polynomial.

leading_coefficient()

Return the leading coefficient.

leading_term()

Return the leading term as a tuple (degree, coefficient).

ring_mul_karatsuba(other)

Multiplication of two polynomials in the same ring. Computation is carried out by Karatsuba method.