All Packages Class Hierarchy This Package Previous Next Index
Class berkeley.cs.dmc.numericalMethods.Integrator
java.lang.Object
|
+----berkeley.cs.dmc.numericalMethods.Integrator
- public final class Integrator
- extends Object
The Integrator class defines methods for numerically integrating
differential equations. The actual routine used is a 5th order
Runge-Kutta method given in "Numerical Recipes", Cambridge University Press,
1992.
-
Integrator(Derivative)
- An instance of the class that evaluates the function's derivatives is
given to the constructor.
-
ODEIntegrate(double[], double, double, double, double, double)
- The integration routine.
Integrator
public Integrator(Derivative derivs)
- An instance of the class that evaluates the function's derivatives is
given to the constructor. The derivatives routine is the complete
description of the function.
- Parameters:
- derivs - An instance of the class to evaluate the function's
derivatives. This class must implement the Derivative
interface.
- See Also:
- Derivative
ODEIntegrate
public synchronized void ODEIntegrate(double ystart[],
double x1,
double x2,
double eps,
double h1,
double hmin) throws ArithmeticException
- The integration routine. Integrates from x1 to x2, with error
tolerance eps, initial step size h1 and minimum step size hmin.
- Parameters:
- ystart - The initial values for all the variables.
- x1 - The initial ordinate value (generally time).
- x2 - The final ordinate value (generally time).
- eps - The error tolerance.
- h1 - The initial step size.
- hmin - The minimum step size. An exception wil be thrown if
the step size drops below this value.
- Throws: ArithmeticException
- Thrown if the step size becomes
too small or the number of steps is
too large.
All Packages Class Hierarchy This Package Previous Next Index