kahle | R Documentation |
A sparse multivariate polynomial inspired by Kahle (2013)
kahle(n = 26, r = 1, p = 1, coeffs = 1, symbols = letters)
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.
special
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.