# NOT RUN {
polyMgen.a() # default size & coefficients & rank
polyMgen.a(2,3,1:6) # given coefficients & default rank
polyMgen.a(2,3,1:6,degree=1) # given coefficients & rank
polyMgen.a(2,3,1:36,degree=matrix(0:5,2,3)) # given coefficients & ranks
polyMgen.a(2,3,1:12,degree=matrix(2:0,2,3)) # given coefficients & ranks
polyMgen.a(rand=TRUE) # normally distributed coefficients
polyMgen.a(rand=rexp) # exponentially distributed coefficients
pois.vg.fv <- function(x) rpois(x,1)
polyMgen.a(rand=pois.vg.fv) # Poisson(1) distributed coefficients
rm(pois.vg.fv)
polyMgen.b() # class="polyMbroad", broad matrix form
polyMgen.c() # class="polyMcells", list of coefficient matrices
polyMgen.d() # class="polyMdlist", dubble list
polyMgen.d(2,2,
rawData=list(polynom::polynomial(1),
polynom::polynomial(c(0,0,1)),
polynom::polynomial(c(0,1)),
polynom::polynomial(0)))
px <- polyMgen.d(3,3,rawData=ch2pn(
c("-3 + z^2","2 + 4*z","-z^2",
"1","2","3 + z",
"2*z","0","2 - 3*z"),"z"))
class(px) # "polyMdlist" "polyMatrix"
px
px <- polyMgen.d(3,3,rawData=ch2pn(
c("-3 + z^2","2 + 4*z","-z^2",
"1","2","3 + z",
"2*z","0","2 - 3*z"),"z"),byrow=TRUE)
class(px) # "polyMdlist" "polyMatrix"
px
polyMgen.d()
polyMgen.d(rand=TRUE)
polyMgen.d(rand=TRUE,degree=2)
polyMgen.d(degree=3)
polyMgen.d(degree=NULL)
# clean up
# rm(px)
# }
Run the code above in your browser using DataLab