This function iterates print.mpoly on an object of class mpolyList.

# S3 method for mpolyList
print(
  x,
  varorder = vars(x),
  stars = FALSE,
  order,
  silent = FALSE,
  ...,
  plus_pad = 2L,
  times_pad = 1L
)

Arguments

x

an object of class mpoly

varorder

the order of the variables

stars

print the multivariate polynomial in the more computer-friendly asterisk notation (default FALSE)

order

a total order used to order the monomials in the printing

silent

logical; if TRUE, suppresses output

...

additional parameters to go to base::cat()

plus_pad

number of spaces to the left and right of plus sign

times_pad

number of spaces to the left and right of times sign

Value

Invisible character vector of the printed objects.

Examples

mL <- mp(c("x + 1", "y - 1", "x y^2 z + x^2 z^2 + z^2 + x^3")) mL
#> x + 1 #> y - 1 #> x^3 + x^2 z^2 + x y^2 z + z^2
print(mL, order = "lex")
#> Using variable ordering - x, y, z
#> x + 1 #> y - 1 #> x^3 + x^2 z^2 + x y^2 z + z^2
print(mL, order = "glex")
#> Using variable ordering - x, y, z
#> x + 1 #> y - 1 #> x^2 z^2 + x y^2 z + x^3 + z^2
print(mL, order = "grlex")
#> Using variable ordering - x, y, z
#> x + 1 #> y - 1 #> x y^2 z + x^2 z^2 + x^3 + z^2
print(mL, order = "glex", varorder = c("z","y","x"))
#> x + 1 #> y - 1 #> z^2 x^2 + z y^2 x + x^3 + z^2
print(mL, order = "grlex", varorder = c("z","y","x"))
#> x + 1 #> y - 1 #> z y^2 x + z^2 x^2 + x^3 + z^2
print(mL, varorder = c("z","y","x"))
#> x + 1 #> y - 1 #> z^2 x^2 + z^2 + z y^2 x + x^3
(print(mL, varorder = c("z","y","x"), plus_pad = 1L, silent = TRUE))
#> [1] "x + 1" "y - 1" #> [3] "z^2 x^2 + z^2 + z y^2 x + x^3"
(print(mL, silent = TRUE, stars = TRUE, plus_pad = 1L, times_pad = 0L))
#> [1] "x + 1" "y - 1" #> [3] "x**3 + x**2*z**2 + x*y**2*z + z**2"