Class Adams
java.lang.Object
nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
nl.tudelft.simulation.jstats.ode.integrators.CachingNumericalIntegrator
nl.tudelft.simulation.jstats.ode.integrators.Adams
- All Implemented Interfaces:
Serializable
The Adams-Bashforth-Moulton numerical estimator as described in
https://mathworld.wolfram.com/AdamsMethod.html
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Alexander Verbraeck, Peter Jacobs
- See Also:
-
Field Summary
Fields inherited from class nl.tudelft.simulation.jstats.ode.integrators.CachingNumericalIntegrator
startingIntegrator, startingSubSteps
Fields inherited from class nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
equation, error, stepSize
-
Constructor Summary
ConstructorDescriptionAdams
(double stepSize, DifferentialEquationInterface equation) constructs a new Adams integrator.Adams
(double stepSize, DifferentialEquationInterface equation, NumericalIntegratorType primerIntegrationMethod, int startingSubSteps) constructs a new Adams integrator, indicating the starting method and number of substeps. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
next
(double x) The integrators that extend the CachingNumericalIntegrator calculate the value of y(x+stepSize) just based on the x-value.Methods inherited from class nl.tudelft.simulation.jstats.ode.integrators.CachingNumericalIntegrator
getDY, getY, next, setStepSize
Methods inherited from class nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
add, add, add, add, add, getError, getStepSize, multiply
-
Constructor Details
-
Adams
constructs a new Adams integrator.- Parameters:
stepSize
- double; the stepSize to use in the estimation.equation
- DifferentialEquationInterface; the equation to use.
-
Adams
public Adams(double stepSize, DifferentialEquationInterface equation, NumericalIntegratorType primerIntegrationMethod, int startingSubSteps) constructs a new Adams integrator, indicating the starting method and number of substeps.- Parameters:
stepSize
- double; the stepSize to use in the estimation.equation
- DifferentialEquationInterface; the equation to use.primerIntegrationMethod
- NumericalIntegratorType; the primer integrator to usestartingSubSteps
- int; the number of substeps per timestep during starting of the integrator
-
-
Method Details
-
next
public double[] next(double x) The integrators that extend the CachingNumericalIntegrator calculate the value of y(x+stepSize) just based on the x-value. They retrieve y(x), y(x-stepSize), etc. or y(k), y(k-1) all from the cache.- Specified by:
next
in classCachingNumericalIntegrator
- Parameters:
x
- double; the x-value to use in the calculation- Returns:
- the value of y(x+stepSize)
-