Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.common.input.dis
Class RungeKuttaSolver

java.lang.Object
  extended by org.web3d.vrml.renderer.common.input.dis.RungeKuttaSolver
All Implemented Interfaces:
Solver

public class RungeKuttaSolver
extends java.lang.Object
implements 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.2 $
Author:
Andrzej Kapolka, Alan Hudson

Constructor Summary
RungeKuttaSolver(int size)
          Constructor.
 
Method Summary
 void 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RungeKuttaSolver

public RungeKuttaSolver(int size)
Constructor.

Parameters:
size - The maximum number of variables.
Method Detail

solve

public void 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.

Specified by:
solve in interface Solver
Parameters:
target - the solver target, used to determine the rates of change
initialValues - the initial values of the variables
timeInterval - the time interval, in seconds
errorThreshold - the maximum permissable error
results - an array to hold the values of the variables at the end of the time interval

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium