This function takes in a first vector of coefficients, and a second
vector declaring which univariate polynomial basis corresponds to
each element ofexponents corresponding to each element of
vector
.
genmonomial(vector, basis, zero = FALSE, as.function = FALSE)
numeric, a vector of coefficients in a polynomial.
integer, a vector of the polynomial degrees
corresponding to the coefficients in vector
logical, if FALSE
then vector
does not
include an element for the constant term. The vector
basis
will need to be adjusted to account for this in
order to generate the correct polynomial and monomials.
boolean, if FALSE
then polynomials are
returned; if TRUE
then a function corresponding to the
polynomial is returned.
A list of monomials, in the form of the polynom
package.