This project is read-only.
Project Description
One dimensional root finding.

Root finding is something of a black art. Improvements to even one-dimensional algorithms such as Brent's method are still being created. This library factors the problem into reusable components.

The class root1d has three main methods: init, step, and done. By default it tracks the entire sequence of ordinates and abscissae during iteration. The class root1d takes the function who's root is to be found. The initialization routines set the first abscissae (and optionally the first ordinates). This is usually the trickiest part to get right. The step method allows for various algorithms: bisection, secant, newton,... It only adds one additional pair to the approximation. Likewise the done method allows for various tests for convergence: interval (using absolute and or relative error) on the abscissae and residual for testing absolute error on the ordinate.

This allows for different step and done techniques to be used, as in the Brent algorithm. The convenience method solve takes a step and done parameter and iterates. The parameters are simply functions that update the state or are called to inspect the state for termination conditions.

Last edited Dec 14, 2013 at 1:43 AM by keithalewis, version 4