Class Euler
java.lang.Object
nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
nl.tudelft.simulation.jstats.ode.integrators.Euler
- All Implemented Interfaces:
Serializable
The Euler numerical estimator as described in
https://mathworld.wolfram.com/EulerForwardMethod.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.NumericalIntegrator
equation, error, stepSize
-
Constructor Summary
ConstructorDescriptionEuler
(double stepSize, DifferentialEquationInterface equation) constructs a new Euler. -
Method Summary
Methods inherited from class nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
add, add, add, add, add, getError, getStepSize, multiply, setStepSize
-
Constructor Details
-
Euler
constructs a new Euler.- Parameters:
stepSize
- double; the stepSizeequation
- DifferentialEquationInterface; the differentialEquation
-
-
Method Details
-
next
public double[] next(double x, double[] y) computes the next value.- Specified by:
next
in classNumericalIntegrator
- Parameters:
x
- double; the x value corresponding to the last y-value computedy
- double[]; the last y value- Returns:
- the new value
-