Nengo.ca

ca.nengo.dynamics.impl
Class EulerIntegrator

java.lang.Object
  extended by ca.nengo.dynamics.impl.EulerIntegrator
All Implemented Interfaces:
Integrator, java.io.Serializable, java.lang.Cloneable

public class EulerIntegrator
extends java.lang.Object
implements Integrator

Euler's method of numerical integration: x(t+h) ~ x(t) + h*x'(t) TODO: test TODO: should there be some means for aborting early (aside from exceptions, e.g. if output converges to constant)?

See Also:
Serialized Form

Constructor Summary
EulerIntegrator()
          Uses default step size of .0001
EulerIntegrator(float stepSize)
           
 
Method Summary
 Integrator clone()
           
 float getStepSize()
           
 TimeSeries integrate(DynamicalSystem system, TimeSeries input)
          Linear interpolation is performed between given input points.
 void setStepSize(float stepSize)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EulerIntegrator

public EulerIntegrator(float stepSize)
Parameters:
stepSize - Timestep size (dt)

EulerIntegrator

public EulerIntegrator()
Uses default step size of .0001

Method Detail

getStepSize

public float getStepSize()
Returns:
get Timestep size

setStepSize

public void setStepSize(float stepSize)
Parameters:
stepSize - Timestep size

integrate

public TimeSeries integrate(DynamicalSystem system,
                            TimeSeries input)
Linear interpolation is performed between given input points.

Specified by:
integrate in interface Integrator
Parameters:
system - The DynamicalSystem to solve.
input - Input vector to the system, defined at the desired start and end times of integration, and optionally at times in between. The way in which the integrator interpolates between inputs at different times is decided by the Integrator implementation.
Returns:
Time series of output vector
See Also:
Integrator.integrate(ca.nengo.dynamics.DynamicalSystem, ca.nengo.util.TimeSeries)

clone

public Integrator clone()
                 throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Integrator
Overrides:
clone in class java.lang.Object
Returns:
cloned Integrator
Throws:
java.lang.CloneNotSupportedException - is clone operation fails

Nengo.ca