species-0.3.1: Computational combinatorial species

Math.Combinatorics.Species.NewtonRaphson

Synopsis

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 * (r `o` t) (that is, 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, newtonRaphson r k computes a species which has contact at least k with the species t = x * (r `o` t).

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

newtonRaphsonRec f k tries to compute the recursive species represented by the code 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.

solveForR :: (ASTFunctor f, Species s) => f -> Maybe (s, s)Source

Given a code f representing a recursive species, try to find an integer species N and species R such that f = N + X*R(f). If such species can be found, return Just (N,R); otherwise return Nothing.