Multidimensional arrays are interpreted in a natural way as multivariate
polynomials.
Taking a matrix a
as an example, because this has two dimensions
it may be viewed as a bivariate polynomial with a[i,j]
being the
coefficient of \(x^iy^j\). Note the off-by-one issue; see
?Extract
.
Multivariate polynomials of arbitrary arity are a straightforward
generalization using appropriately dimensioned arrays.
Arithmetic operations “+
”,“-
”,
“*
”, “^
” operate as though their arguments
are multivariate polynomials.
Even quite small multipols are computationally intense; many
coefficients have to be calculated and each is the sum of many terms.
The package is almost completely superceded by the spray and
mvp packages, which use a sparse array system for efficiency.