ooom: One-over-one-minus for spray objects

ooomR Documentation

One-over-one-minus for spray objects

Description

One-over-one-minus for spray objects; the nearest to ‘division’ that we can get.

Usage

ooom(S, n)

Arguments

S

object of class spray

n

Order of the approximation

Details

\loadmathjax

Returns the Taylor expansion to order n of \mjseqn1/(1-S), that is, \mjeqn1+S+S^2+S^3+\cdots +S^n1+S+S^2+S^3+...+S^n.

Value

Returns a spray object of the same arity as S.

Note

Uses Horner's method for efficiency

Author(s)

Robin K. S. Hankin

Examples


(x <- spray(matrix(1)))
ooom(x,5)  # 1 + x + x^2 + x^3 + x^4 + x^5


(a <- homog(4,2))
d <- (1-a)*ooom(a,3)

constant(d)    # should be 1
rowSums(index(d))   # a single 0 and lots of 8s.

spray documentation built on Aug. 10, 2023, 5:11 p.m.