kahle: A sparse multivariate polynomial

Description Usage Arguments Author(s) References See Also Examples

Description

A sparse multivariate polynomial inspired by Kahle (2013)

Usage

1
kahle(n = 26, r = 1, p = 1, coeffs = 1, symbols = letters)

Arguments

n

Number of different symbols to use

r

Number of symbols in a single term

p

Power of each symbol in each terms

coeffs

Coefficients of the terms

symbols

Alphabet of symbols

Author(s)

Robin K. S. Hankin

References

David Kahle 2013. “mpoly: multivariate polynomials in R”. R Journal, volume 5/1.

See Also

special

Examples

1
2
3
4
5
6
7
kahle()  # a+b+...+z
kahle(r=2,p=1:2)  # Kahle's original example

## example where mvp runs faster than spray (mvp does not need a 200x200 matrix):
k <- kahle(200,r=3,p=1:3,symbols=paste("x",sprintf("%02d",1:200),sep=""))
system.time(ignore <- k^2)
#system.time(ignore <- mvp_to_spray(k)^2)   # needs spray package loaded

mvp documentation built on Sept. 5, 2019, 9:03 a.m.