Description Usage Arguments Author(s) References See Also Examples
A sparse multivariate polynomial inspired by Kahle (2013)
1 |
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 |
Robin K. S. Hankin
David Kahle 2013. “mpoly: multivariate polynomials in R”. R Journal, volume 5/1.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.