# SuanShu, a Java numerical and statistical library

• java.lang.Object
• All Implemented Interfaces:
ODESolver

public class AdamsBashforthMoulton
extends Object
implements ODESolver
This class uses an Adams-Bashford predictor and an Adams-Moulton corrector of the specified order. This is an order-n multi-step method which uses the last n computed points based on Newton's backward difference interpolating polynomial of degree (n-1) (unlike single-step methods which only use the most recent value to compute the next solution point). Since the predictor and the corrector are not self-starting, a single-step method such as a Runge-Kutta method is used to compute the first n points.
Wikipedia: Linear multistep method
• ### Constructor Summary

Constructors
Constructor and Description
AdamsBashforthMoulton(ABMPredictorCorrector predictorCorrector, double stepSize)
Create a new instance of the Adams-Bashforth-Moulton method using the given predictor-corrector pair.
AdamsBashforthMoulton(ABMPredictorCorrector predictorCorrector, double stepSize, ODEIntegrator integrator)
Create a new instance of the Adams-Bashforth-Moulton method using the given predictor-corrector pair and the given ODE integrator.
• ### Method Summary

All Methods
Modifier and Type Method and Description
ODESolution solve(ODE1stOrder ode)
Solve an ODE using the Adams-Bashforth-Moulton method.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

public AdamsBashforthMoulton(ABMPredictorCorrector predictorCorrector,
double stepSize)
Create a new instance of the Adams-Bashforth-Moulton method using the given predictor-corrector pair. RungeKutta2 is used for initializing the first n points.
Parameters:
predictorCorrector - the Adams-Bashforth and Adams-Moulton formulae that are used
stepSize - the step size between each approximation

public AdamsBashforthMoulton(ABMPredictorCorrector predictorCorrector,
double stepSize,
ODEIntegrator integrator)
Create a new instance of the Adams-Bashforth-Moulton method using the given predictor-corrector pair and the given ODE integrator.
Parameters:
predictorCorrector - the Adams-Bashforth and Adams-Moulton formulae that are used
stepSize - the step size between each approximation
integrator - the integrator for initializing the first n points
• ### Method Detail

• #### solve

public ODESolution solve(ODE1stOrder ode)
Solve an ODE using the Adams-Bashforth-Moulton method.
Specified by:
solve in interface ODESolver
Parameters:
ode - the ODE problem
Returns:
the solution