Allows arithmetic operators to be used for spray calculations, such as addition, multiplication, division, integer powers, etc. Objects of class spray are interpreted as sparse multivariate polynomials.

1 2 3 4 5 6 7 8 9 | ```
## S3 method for class 'spray'
Ops(e1, e2 = NULL)
spray_negative(S)
spray_times_spray(S1,S2)
spray_times_scalar(S,x)
spray_plus_spray(S1,S2)
spray_plus_scalar(S,x)
spray_power_scalar(S,n)
spray_eq_spray(S1,S2)
``` |

`e1,e2,S,S1,S2` |
Objects of class spray, here interpreted as sparse multivariate polynomials |

`x` |
Real valued scalar |

`n` |
Non-negative integer |

The function `Ops.spray()`

passes unary and binary arithmetic
operators (“`+`

”, “`-`

”, “`*`

”,
“`/`

”,“`==`

”, and “`^`

”) to the
appropriate specialist function.

The most interesting operators are “`*`

” and
“`+`

” which execute multivariate polynomial multiplication
and addition respectively.

Testing for equality uses `spray_eq_spray()`

. Note that
`spray_eq_spray(S1,S2)`

is algebraically equivalent to
`is.zero(S1-S2)`

, but faster (`FALSE`

is returned as soon as
a mismatch is found).

The functions all return spray objects except “`==`

”, which
returns a logical.

Notes here

Robin K. S. Hankin

`ooom`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.