isPolynomialOf {qspray} | R Documentation |
Whether a 'qspray' is a polynomial of some given 'qsprays'
Description
Checks whether a qspray
polynomial can be written as
a polynomial of some given qspray
polynomials. If TRUE
,
this polynomial is returned.
Usage
isPolynomialOf(qspray, qsprays)
Arguments
qspray |
a |
qsprays |
a list of |
Value
A Boolean value indicating whether the polynomial defined by
qspray
can be written as a polynomial of the polynomials defined
by the qspray
objects given in the qsprays
list. If this is
TRUE
, this polynomial is returned as an attribute named
"polynomial"
.
Examples
library(qspray)
x <- qlone(1); y <- qlone(2); z <- qlone(3)
q1 <- x + y
q2 <- x*z^2 + 4
qspray <- q1^2*q2 + 2*q1 + 3
( check <- isPolynomialOf(qspray, list(q1, q2)) )
POLYNOMIAL <- attr(check, "polynomial")
changeVariables(POLYNOMIAL, list(q1, q2)) == qspray # should be TRUE
[Package qspray version 3.1.0 Index]