java.lang.Object
nl.tudelft.simulation.jstats.ode.integrators.NumericalIntegrator
nl.tudelft.simulation.jstats.ode.integrators.RungeKutta4
All Implemented Interfaces:
Serializable

public class RungeKutta4 extends NumericalIntegrator
The RungeKutta4 numerical integrator.

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:
  • Constructor Details

    • RungeKutta4

      public RungeKutta4(double stepSize, DifferentialEquationInterface equation)
      constructs a new RungeKutta4.
      Parameters:
      stepSize - double; the stepSize
      equation - DifferentialEquationInterface; the differentialEquation
  • Method Details

    • next

      public double[] next(double x, double[] y)
      computes the next value.
      Specified by:
      next in class NumericalIntegrator
      Parameters:
      x - double; the x value corresponding to the last y-value computed
      y - double[]; the last y value
      Returns:
      the new value