Class AdamsBashforthMoulton
- java.lang.Object
-
- dev.nm.analysis.differentialequation.ode.ivp.solver.multistep.adamsbashforthmoulton.AdamsBashforthMoulton
-
- 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.- See Also:
- Wikipedia: Linear multistep method
-
-
Constructor Summary
Constructors Constructor 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 Instance Methods Concrete Methods Modifier and Type Method Description ODESolution
solve(ODE1stOrder ode)
Solve an ODE using the Adams-Bashforth-Moulton method.
-
-
-
Constructor Detail
-
AdamsBashforthMoulton
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 usedstepSize
- the step size between each approximation
-
AdamsBashforthMoulton
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 usedstepSize
- the step size between each approximationintegrator
- 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.
-
-