nzmath.poly.uniutil

FieldPolynomial

Polynomial with field coefficients. This kind of polynomials have Euclidean divisions, therefore in addition to the basic polynomial operations, it has division operators.

This class inherits RingPolynomial, DivisionProvider and ContentProvider.

Constructor

FieldPolynomial(coefficients [,coeffring [,keyword arguments]])

Initialize the polynomial.

Methods

content()

Return content of the polynomial.
(This method is inherited from ContentProvider)

primitive_part()

Return the primitive part of the polynomial.
(This method is inherited from ContentProvider)

mod(dividend)

Return dividend % self.
(This method is inherited from DivisionProvider)

scalar_exact_division(scale)

Return quotient by a scalar which can divide each coefficient exactly.
(This method is inherited from DivisionProvider)

gcd(other)

Return a greatest common divisor of self and other. Returned polynomial is always monic.
(This method is inherited from DivisionProvider)

extgcd(other)

Return a tuple (u, v, d); they are the greatest common divisor d of two polynomials self and other and u, v such that

 d = self * u + other * v

see gcd.extgcd.
(This method is inherited from DivisionProvider)

Operators

f // gquotient of floor division
f % gremainder
divmod(f, g)quotient and remainder
f / gdivision in rational function field