ca.nengo.dynamics.impl
Class AbstractDynamicalSystem

java.lang.Object
  extended by ca.nengo.dynamics.impl.AbstractDynamicalSystem
All Implemented Interfaces:
DynamicalSystem, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
HodgkinHuxleySpikeGenerator.HodgkinHuxleySystem

public abstract class AbstractDynamicalSystem
extends java.lang.Object
implements DynamicalSystem

Base implementation of DynamicalSystem.

Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
AbstractDynamicalSystem(float[] state)
           
 
Method Summary
 DynamicalSystem clone()
           
abstract  float[] f(float t, float[] u)
          The dynamic equation.
abstract  float[] g(float t, float[] u)
          The output equation.
abstract  int getInputDimension()
           
abstract  int getOutputDimension()
           
 Units getOutputUnits(int outputDimension)
          Returns Units.UNK by default.
 float[] getState()
           
 void setState(float[] state)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDynamicalSystem

public AbstractDynamicalSystem(float[] state)
Method Detail

f

public abstract float[] f(float t,
                          float[] u)
Description copied from interface: DynamicalSystem
The dynamic equation.

Specified by:
f in interface DynamicalSystem
Parameters:
t - Time
u - Input vector
Returns:
1st derivative of state vector
See Also:
DynamicalSystem.f(float, float[])

g

public abstract float[] g(float t,
                          float[] u)
Description copied from interface: DynamicalSystem
The output equation.

Specified by:
g in interface DynamicalSystem
Parameters:
t - Time
u - Input vector
Returns:
Output vector
See Also:
DynamicalSystem.g(float, float[])

getInputDimension

public abstract int getInputDimension()
Specified by:
getInputDimension in interface DynamicalSystem
Returns:
Dimension of input vector
See Also:
DynamicalSystem.getInputDimension()

getOutputDimension

public abstract int getOutputDimension()
Specified by:
getOutputDimension in interface DynamicalSystem
Returns:
Dimension of output vector
See Also:
DynamicalSystem.getOutputDimension()

getOutputUnits

public Units getOutputUnits(int outputDimension)
Returns Units.UNK by default.

Specified by:
getOutputUnits in interface DynamicalSystem
Parameters:
outputDimension - Numbered from 0
Returns:
Units of output in the given dimension
See Also:
DynamicalSystem.getOutputUnits(int)

getState

public float[] getState()
Specified by:
getState in interface DynamicalSystem
Returns:
State vector
See Also:
DynamicalSystem.getState()

setState

public void setState(float[] state)
Specified by:
setState in interface DynamicalSystem
Parameters:
state - New state vector
See Also:
DynamicalSystem.setState(float[])

clone

public DynamicalSystem clone()
                      throws java.lang.CloneNotSupportedException
Specified by:
clone in interface DynamicalSystem
Overrides:
clone in class java.lang.Object
Returns:
An identical copy of this system which references an independent copy of the state variables
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()