Compute quantities/expressions related to a multivariate polynomial.
# 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)
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 |
An object of class mpoly or mpolyList, depending on the context
#> x y^2 + x^4 z + 3 x^3 z + 2 x^2 z + 3 x^10p[2]#> x^4 zp[-2]#> x y^2 + 3 x^3 z + 2 x^2 z + 3 x^10p[2:3]#> x^4 z + 3 x^3 zLT(p)#> 3 x^10LC(p)#> [1] 3LM(p)#> x^10multideg(p)#> x y z #> 10 0 0totaldeg(p)#> [1] 10monomials(p)#> x y^2 #> x^4 z #> 3 x^3 z #> 2 x^2 z #> 3 x^10exponents(p)#> [[1]] #> x y z #> 1 2 0 #> #> [[2]] #> x y z #> 4 0 1 #> #> [[3]] #> x y z #> 3 0 1 #> #> [[4]] #> x y z #> 2 0 1 #> #> [[5]] #> x y z #> 10 0 0 #>exponents(p, reduce = TRUE)#> [[1]] #> x y #> 1 2 #> #> [[2]] #> x z #> 4 1 #> #> [[3]] #> x z #> 3 1 #> #> [[4]] #> x z #> 2 1 #> #> [[5]] #> x #> 10 #>#> [[1]] #> [1] TRUE #> #> [[2]] #> [1] TRUE #> #> [[3]] #> [1] TRUE #> #> [[4]] #> [1] TRUE #> #> [[5]] #> [1] TRUE #>#> 2 x^2 z + x y^2 #> 3 x^3 z #> x^4 z #> 3 x^10