Class RungeKuttaSolver
java.lang.Object
org.web3d.vrml.renderer.common.input.dis.RungeKuttaSolver
- All Implemented Interfaces:
Solver
A fourth order Runge-Kutta solver with adaptive step sizing, as described
here:
http://www-2.cs.cmu.edu/~baraff/sigcourse/notesb.pdf.
- Version:
- $Revision: 1.3 $
- Author:
- Andrzej Kapolka, Alan Hudson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
solve
(SolverTarget target, double[] initialValues, double timeInterval, double errorThreshold, double[] results) Calculates and returns the values of the target variables after the specified time interval.
-
Constructor Details
-
RungeKuttaSolver
public RungeKuttaSolver(int size) Constructor.- Parameters:
size
- The maximum number of variables.
-
-
Method Details
-
solve
public void solve(SolverTarget target, double[] initialValues, double timeInterval, double errorThreshold, double[] results) Description copied from interface:Solver
Calculates and returns the values of the target variables after the specified time interval.- Specified by:
solve
in interfaceSolver
- Parameters:
target
- the solver target, used to determine the rates of changeinitialValues
- the initial values of the variablestimeInterval
- the time interval, in secondserrorThreshold
- the maximum permissible errorresults
- an array to hold the values of the variables at the end of the time interval
-