Remove redundant entries from a multipol

Description

Remove redundant entries from a multivariate polynomial: function trim() trims the array of non-significant zeroes as far as possible without altering its value as a multipol; function taylor() returns the multivariate Taylor expansion to a specified order.

Usage

1
2
trim(a)
taylor(a,maxorder=NULL)

Arguments

a

A multipol

maxorder

The multivariate order of the expansion returned; default of NULL means to return a unaltered

Value

Returns a multipol

Note

If a is a zero multipol (that is, a multivariate polynomial with all entries zero) of any size, then trim(a) is a zero multipol of the same arity as a but with extent 1 in each direction.

Author(s)

Robin K. S. Hankin

See Also

Ops.multipol

Examples

1
2
3
4
5
6
a <- matrix(0,7,7)
a[1:3,1:4] <- 1:12
a <- as.multipol(a)
a
trim(a)
taylor(a,2)