nzmath.poly.termorder

MultivarTermOrder

A class of term orders for multivariate polynomials.

This class inherits TermOrderInterface.

constructor

MultivarTermOrder(comparator)

comparator accepts two tuples of integers, each of which represents power indeces of the term, and returns 0, 1 or -1 just like cmp built-in function.

methods

cmp(left, right)

Compare two indeces left and right and determine precedence.

format(polynom [, varname="X" [, reverse=False]])

Return the formatted string of the polynomial.

An additional keyword argument varnames is required to name variables.
Another additional keyword argument reverse changes the order ascending to descending if it is True.

leading_coefficient(polynom)

Return the leading coefficient of polynomial polynom with respect to the term order.

leading_term(polynom)

Return the leading term of polynomial polynom as tuple of (degree index, coefficient) with respect to the term order.