Various functions to create simple multivariate polynomials
special.RdVarious functions to create simple mvp objects such as single-term,
homogeneous, and constant multivariate polynomials.
Usage
product(v,symbols=letters)
homog(d,power=1,symbols=letters)
linear(x,power=1,symbols=letters)
xyz(n,symbols=letters)
numeric_to_mvp(x)Note
The functions here are related to their equivalents in the multipol and spray packages, but are not exactly the same.
Function constant() is documented at constant.Rd, but is listed
below for convenience.
Examples
product(1:3) # a * b^2 * c^3
#> mvp object algebraically equal to
#> a b^2 c^3
homog(3) # a + b + c
#> mvp object algebraically equal to
#> a + b + c
homog(3,2) # a^2 + a b + a c + b^2 + b c + c^2
#> mvp object algebraically equal to
#> a b + a c + a^2 + b c + b^2 + c^2
linear(1:3) # 1*a + 2*b + 3*c
#> mvp object algebraically equal to
#> a + 2 b + 3 c
constant(5) # 5
#> mvp object algebraically equal to
#> 5
xyz(5) # a*b*c*d*e
#> mvp object algebraically equal to
#> a b c d e