org.vizzini.math.ode
Class AbstractODE

java.lang.Object
  extended by org.vizzini.math.ode.AbstractODE
All Implemented Interfaces:
IODE
Direct Known Subclasses:
DynamicStateODE

public abstract class AbstractODE
extends Object
implements IODE

Provides base functionality for ordinary differential equations in the game framework.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
AbstractODE(int numEqns)
          Construct this object with the given parameter.
 
Method Summary
protected  void checkIndex(int index)
          Check the given index for range.
 double[] getAllQ()
          Return the values of all the dependent variables.
 int getEquationCount()
          Return the equation count.
 double getQ(int index)
          Return the value of the dependent variable at the given index.
 double getS()
          Return the value of the independent variable.
 void setQ(double value, int index)
          Set the value of the dependent variable at the given index.
 void setS(double value)
          Set the value of the independent variable.
 void updatePostProcess()
          Perform update post-processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.vizzini.math.ode.IODE
getRightHandSide
 

Constructor Detail

AbstractODE

public AbstractODE(int numEqns)
Construct this object with the given parameter.

Parameters:
numEqns - Number of equations.
Since:
v0.3
Method Detail

getAllQ

public double[] getAllQ()
Return the values of all the dependent variables.

Specified by:
getAllQ in interface IODE
Since:
v0.3

getEquationCount

public int getEquationCount()
Return the equation count.

Specified by:
getEquationCount in interface IODE
Since:
v0.3

getQ

public double getQ(int index)
Return the value of the dependent variable at the given index.

Specified by:
getQ in interface IODE
Parameters:
index - Index of the dependent variable.
Since:
v0.3

getS

public double getS()
Return the value of the independent variable.

Specified by:
getS in interface IODE
Since:
v0.3

setQ

public void setQ(double value,
                 int index)
Set the value of the dependent variable at the given index.

Specified by:
setQ in interface IODE
Parameters:
value - Dependent variable value.
index - Index of the dependent variable.
Since:
v0.3

setS

public void setS(double value)
Set the value of the independent variable.

Specified by:
setS in interface IODE
Since:
v0.3

updatePostProcess

public void updatePostProcess()
Perform update post-processing. The base class method does nothing.

Specified by:
updatePostProcess in interface IODE
Since:
v0.3

checkIndex

protected void checkIndex(int index)
Check the given index for range.

Parameters:
index - Index of the dependent variable.
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02