1 package nl.tudelft.simulation.jstats.ode; 2 3 /** 4 * An interface for the DifferentialEquation. 5 * <p> 6 * Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See 7 * for project information <a href="https://simulation.tudelft.nl/" target="_blank"> https://simulation.tudelft.nl</a>. The DSOL 8 * project is distributed under a three-clause BSD-style license, which can be found at 9 * <a href="https://https://simulation.tudelft.nl/dsol/docs/latest/license.html" target="_blank"> 10 * https://https://simulation.tudelft.nl/dsol/docs/latest/license.html</a>. 11 * </p> 12 * @author <a href="https://www.tudelft.nl/averbraeck" target="_blank"> Alexander Verbraeck</a> 13 * @author <a href="https://www.linkedin.com/in/peterhmjacobs">Peter Jacobs </a> 14 */ 15 public interface DifferentialEquationInterface 16 { 17 /** 18 * initializes the differential equation. 19 * @param x0 double; the initial x-value 20 * @param y0 double[]; the initial y-value array 21 */ 22 void initialize(double x0, double[] y0); 23 24 /** 25 * returns y as a function of x. 26 * @param x double; the x-value 27 * @return y 28 */ 29 double[] y(double x); 30 31 /** 32 * returns dy as a function of x,y. 33 * @param x double; the x-value 34 * @param y double[]; the y-value 35 * @return dy/dx as a function of x,y 36 */ 37 double[] dy(double x, double[] y); 38 }