nr.ode
Class ODE.Factory

java.lang.Object
  extended by nr.ode.ODE.Factory
Enclosing class:
ODE

public static class ODE.Factory
extends java.lang.Object

an ODE factory that allows changing the algorithm. See Design Patterns (Factory and Strategy)


Constructor Summary
ODE.Factory()
           
 
Method Summary
 java.lang.String[] descriptions()
          the list of descriptions of solvers
 java.lang.String getODE()
          gets the name of the current ODE
 ODE instance(VecFunction dxdt)
           
 java.lang.String[] names()
          the list of names of solvers
 void setODE(java.lang.String name)
          sets the current ODE solver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODE.Factory

public ODE.Factory()
Method Detail

instance

public ODE instance(VecFunction dxdt)
             throws java.lang.NoSuchMethodException,
                    java.lang.InstantiationException,
                    java.lang.IllegalAccessException,
                    java.lang.reflect.InvocationTargetException
Throws:
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getODE

public java.lang.String getODE()
gets the name of the current ODE

Returns:
the name of the currently selected ODE

setODE

public void setODE(java.lang.String name)
sets the current ODE solver

Parameters:
name - the name of the desired ODE solver
Throws:
java.lang.IllegalArgumentException - if no such solver exists

names

public java.lang.String[] names()
the list of names of solvers

Returns:
an array of String representing the name of each solving algorithm

descriptions

public java.lang.String[] descriptions()
the list of descriptions of solvers

Returns:
an array of String representing the description of each solving algorithm