convert.multipol function

Convert between multipol and list representations of multivariate polynomials

Convert between multipol and list representations of multivariate polynomials

Converts an multipol object to a simple list representing a multivariate polynomial or a simple list to an multipol object

convert.multipol(poly)

Arguments

  • poly: a multipol object or a list giving powers and coefficients defining the polynomial

Returns

if poly is of class 'multipol', it is a list with two components described below. If poly is such a list, the value is the corresponding multipol object

Details

The list representation consists of 2 components: 'powers' is a matrix with each row representing the powers of X in one term of the multivariate polynomial. 'coeff' is a vector with each element being the coefficient of the corresponding term in powers

References

K Phillips, Symbolic Computation of the Central Moments of the Multivariate Normal Distribution, Journal of Statistical Software, 2010.

Author(s)

Kem Phillips kemphillips@comcast.net

See Also

convert.multipol, evaluate.expected.polynomial, integrate.polynomial

Examples

# create an mpoly object to work with (requires library mpoly) (not run) # t0 <- mpoly::mpoly(list(c(coef=3,x1=2),c(coef=2,x1=1,x2=3), # c(coef=-4,z=2),c(coef=1,x1=1,x2=2,z=1))) # convert from mpoly to list representation (not run) # t1 <- convert.mpoly(t0) # convert from list representation to a multipol object(not run) # t2 <- convert.multipol(t1) # convert back to a list representation (not run) # t3 <- convert.multipol(t2)
  • Maintainer: Kem Phillips
  • License: GPL
  • Last published: 2020-02-05

Useful links