Safe Haskell | None |
---|

- newtonRaphsonIter :: Species s => s -> Integer -> s -> s
- newtonRaphson :: Species s => s -> Integer -> s
- newtonRaphsonRec :: (ASTFunctor f, Species s) => f -> Integer -> Maybe s
- solveForR :: (ASTFunctor f, Species s) => f -> Maybe (s, s)

# Documentation

newtonRaphsonIter :: Species s => s -> Integer -> s -> sSource

A single iteration of the Newton-Raphson method.
`newtonRaphsonIter r k a`

assumes that `a`

is a species having
contact of order `k`

with species `t = x `

(that
is, `*`

(r ``o`

` t)`a`

and `t`

agree on all label sets of size up to and
including `k`

), and returns a new species with contact of order
`2k+2`

with `t`

.

See BLL section 3.3.

newtonRaphson :: Species s => s -> Integer -> sSource

Given a species `r`

and a desired accuracy `k`

,

computes a species which has contact at least `newtonRaphson`

r k`k`

with the
species `t = x `

.
`*`

(r ``o`

` t)

newtonRaphsonRec :: (ASTFunctor f, Species s) => f -> Integer -> Maybe sSource

tries to compute the recursive species
represented by the code `newtonRaphsonRec`

f k`f`

up to order at least `k`

, using
Newton-Raphson iteration. Returns `Nothing`

if `f`

cannot be
written in the form `f = X*R(f)`

for some species `R`

.