Learn R Programming

mpoly (version 1.1.1)

components: Polynomial components

Description

Compute quantities/expressions related to a multivariate polynomial.

Usage

# S3 method for mpoly
[(x, ndx)

LT(x, varorder = vars(x), order = "lex")

LC(x, varorder = vars(x), order = "lex")

LM(x, varorder = vars(x), order = "lex")

multideg(x, varorder = vars(x), order = "lex")

totaldeg(x)

monomials(x)

exponents(x, reduced = FALSE)

Arguments

x

an object of class mpoly

ndx

a subsetting index

varorder

the order of the variables

order

a total order used to order the terms

reduced

if TRUE, don't include zero degrees

Value

An object of class mpoly or mpolyList, depending on the context

Examples

Run this code
# NOT RUN {
(p <- mp("x y^2 + x (x+1) (x+2) x z + 3 x^10"))
p[2]
p[-2]
p[2:3]

LT(p)
LC(p)
LM(p)

multideg(p)
totaldeg(p)
monomials(p)

exponents(p)
exponents(p, reduce = TRUE)
lapply(exponents(p), is.integer)

homogeneous_components(p)

# }

Run the code above in your browser using DataLab