constant {multipol}R Documentation

Various useful multivariate polynomials

Description

Various useful multivariate polynomials such as homogeneous polynomials, linear polynomials, etc

Usage

constant(d)
product(x)
homog(d, n = d, value = 1)
linear(x, power = 1)
lone(d,x)
single(d, e, power = 1)
uni(d)
zero(d)

Arguments

d

Integer giving the dimensionality (arity) of the result

x

A vector of integers

n, e, power

Integers

value

Value for linear multivariate polynomial

Details

In the following, all multipols have their nonzero entries 1 unless otherwise stated.

Note

In many ways, the functions documented in this section are an adverisement for the inefficiency of dealing with multipols using arrays: sparse arrays would be the natural solution.

Author(s)

Robin K. S. Hankin

See Also

outer,product,is.constant

Examples


product(c(1,2,5))     #   x * y^2 * z^5
uni(3)                #   xyz
single(3,1)           #   x
single(3,2)           #   y
single(3,3)           #   z
single(3,1,6)         #   x^6        
single(3,2,6)         #   y^6
lone(3,1:2)           #   xy
lone(3,c(1,3))        #   xz
linear(c(1,2,5))      #   x + 2y + 5z
ones(3)               #   x+y+z
constant(3)           #   1 + 0x + 0y + 0z
zero(3)               #   0 + 0x + 0y + 0z
homog(3,2)            #   x^2 + y^2 + z^2 + xy + xz + yz

# now some multivariate factorization:

ones(2)*linear(c(1,-1))                                       # x^2-y^2
ones(2)*(linear(c(1,1),2)-uni(2))                             # x^3+y^3
linear(c(1,-1))*homog(2,2)                                    # x^3+y^3 again
ones(2)*(ones(2,4)+uni(2)^2-product(c(1,3))-product(c(3,1)))  # x^5+y^5
ones(2)*homog(2,4,c(1,-1,1,-1,1))                             # x^5+y^5 again
  

[Package multipol version 1.0-9 Index]