All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class phaser.algorithm.RungeKuttaK4

java.lang.Object
   |
   +----phaser.algorithm.Algorithm
           |
           +----phaser.algorithm.RungeKuttaK4

public class RungeKuttaK4
extends Algorithm
A class that implements the Runge-Kutta Classic 4th Order Algorithm:

y_n = y_{n - 1} + ( K1 + 2K2 + 2K3 + K4 ) / 6

where,

K1 = h * f( t_{n - 1}, y_{n - 1} )
K2 = h * f( t_{n - 1} + h / 2, y_{n - 1} + K1 / 2 )
K3 = h * f( t_{n - 1} + h / 2, y_{n - 1} + K2 / 2 )
K4 = h * f( t_{n - 1} + h, y_{n - 1} + K3 )


Constructor Index

 o RungeKuttaK4()

Method Index

 o apply(Equation, double[], double[], double, double)
 o getStatKeys()
 o toString()

Constructors

 o RungeKuttaK4
 public RungeKuttaK4()

Methods

 o apply
 public void apply(Equation equation,
                   double xNew[],
                   double xOld[],
                   double stepSize,
                   double time)
Overrides:
apply in class Algorithm
 o getStatKeys
 public int[] getStatKeys()
Overrides:
getStatKeys in class Algorithm
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index