Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

polyMconvert

Conversion between the pairs of the four polyMatrix subclasses


Description

The polyMatrix package has 4 different but equivalent methods to store the polynomial matrices.

This function provides a conversion between the 4 methods. In the background operates one of the existing 12 subrutines, corresponding to the sub-class of the given input object and the required sub-class of the output object.

Usage

polyMconvert(pm, newclass)

Arguments

pm

an arbitrary polyMatrix class object

newclass

a class identifier character string, one of the following: \ "polyMarray", "polyMbroad", "polyMcells" or "polyMdlist"

Value

A polyMatrix class object, equivalent with the pM input object, but stored in the new, given format by the newclass parameter.

See Also

Examples

set.seed(2)
pa <- polyMgen.a(rand=function(x) rpois(x,1)) # Poisson(1) distributed coefficients
class(pa) # "polyMarray" "polyMatrix"
str(pa)
pa

pb <- polyMconvert(pa,'polyMbroad')
class(pb) # "polyMbroad" "polyMatrix"
str(pb)
pb

pc <- polyMconvert(pa,'polyMcells')
class(pc) # "polyMcells" "polyMatrix"
str(pc)
pc

pd <- polyMconvert(pa,'polyMcells')
class(pd) # "polyMdlist" "polyMatrix"
str(pd)
pd

px <- polyMconvert(pa,'polyMarray')
class(px) # "polyMarray" "polyMatrix"
str(px)
px

# clean up
# rm(pa, pb, pc, pd, px)

polyMatrix

Infrastructure for Manipulation Polynomial Matrices

v0.3.1
MIT + file LICENSE
Authors
Tamas Prohle [aut], Peter Prohle [aut], Nikolai Ryzhkov [aut, cre], Ildiko Laszlo [aut] (<https://orcid.org/0000-0003-2324-8183>), Ulas Onat Alakent [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.