polylib::sortMonomials --
sorting monomials with respect to a term ordering
Introductionpolylib::sortMonomials(f, ord) returns a
list of all monomials constituting the polynomial f,
sorted in descending order with respect to ord.
Call(s)polylib::sortMonomials(f)
polylib::sortMonomials(f, vars)
polylib::sortMonomials(f, ord)
polylib::sortMonomials(f, vars, ord)
Parametersf |
- | polynomial or polynomial expression |
vars |
- | nonempty list of identifiers |
ord |
- | monomial ordering |
Returnsa list of polynomials or expressions of the same type as
f.
f
Related
FunctionsDom::MonomOrdering, lmonomial, nthmonomial
DetailsLexOrder, DegreeOrder,
DegInvLexOrder; or an object of type
Dom::MonomOrdering or convertible to that type; or any
object returning a number when called as ord(m1,m2) for
two degree vectors m1 and m2. A degree vector
is a list of integers, as returned by degreevec.f are used.m1 is considered to be
greater than m2 if and only if ord(m1,m2) is
positive .
Example
1The monomials of the polynomial below are compared using
a monomial ordering from Dom::MonomOrdering .
>> polylib::sortMonomials(poly(x^2+x*y^3+2, [x,y]), DegRevLex(2))
3 2
[poly(x y , [x, y]), poly(x , [x, y]), poly(2, [x, y])]