rkm.ode
Class ODE

java.lang.Object
  extended by rkm.ode.ODE
Direct Known Subclasses:
ExampleODE1, ExampleODE2, ExampleODE3, ExampleODE4, ExampleODE5, ExampleODE6, ExampleODE7

public abstract class ODE
extends java.lang.Object

Information about an ODE and its solutions. This class also keeps track of all available subclasses.


Constructor Summary
ODE()
           
 
Method Summary
abstract  double evalDeriv(double x, double y)
          Evaluate this ODE at point (x,y).
abstract  double evalSol(double x0, double y0, double x)
          Evaluate the solution through (x0,y0) at point x.
static ODE[] getAvailableODEs()
           
 double getParameter()
           
abstract  java.lang.String getSolutionDescription()
           
abstract  java.awt.geom.Point2D getStartPointSuggestion()
           
abstract  double getStepSizeSuggestion()
           
abstract  boolean isNearDiscont(double x0, double y0, double x, double eps)
           
abstract  boolean isValidInterval(double x0, double y0, double width)
           
abstract  boolean requiresParameter()
           
 void setParameter(double p)
          Set the parameter to use.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ODE

public ODE()
Method Detail

requiresParameter

public abstract boolean requiresParameter()
Returns:
whether this ODE uses a parameter.

getParameter

public double getParameter()
Returns:
the parameter used (if used).

setParameter

public void setParameter(double p)
Set the parameter to use. ODEs that don't require a parameter will ignore this.


evalDeriv

public abstract double evalDeriv(double x,
                                 double y)
Evaluate this ODE at point (x,y).


evalSol

public abstract double evalSol(double x0,
                               double y0,
                               double x)
Evaluate the solution through (x0,y0) at point x.


isNearDiscont

public abstract boolean isNearDiscont(double x0,
                                      double y0,
                                      double x,
                                      double eps)
Returns:
whether the solution through (x0,y0) at point x is within distance eps of a discontinuity. This information is used when plotting the solution.

isValidInterval

public abstract boolean isValidInterval(double x0,
                                        double y0,
                                        double width)
Returns:
whether the given values can be used as initial values to solve this ODE.

getStartPointSuggestion

public abstract java.awt.geom.Point2D getStartPointSuggestion()
Returns:
a suggested starting point.

getStepSizeSuggestion

public abstract double getStepSizeSuggestion()
Returns:
a suggested step size.

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a description of this ODE.

getSolutionDescription

public abstract java.lang.String getSolutionDescription()
Returns:
a description of the solutions for this ODE.

getAvailableODEs

public static ODE[] getAvailableODEs()
Returns:
an array of ODEs, one of each available subclass.