public class BasicTermination extends java.lang.Object implements Termination, Resettable
Constructor and Description |
---|
BasicTermination(Node node,
DynamicalSystem dynamics,
Integrator integrator,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
BasicTermination |
clone() |
BasicTermination |
clone(Node node)
Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
|
int |
getDimensions() |
InstantaneousOutput |
getInput() |
boolean |
getModulatory() |
java.lang.String |
getName() |
Node |
getNode() |
TimeSeries |
getOutput()
Note: typically called by the Node to which the Termination belongs.
|
float |
getTau() |
void |
reset(boolean randomize) |
void |
run(float startTime,
float endTime)
Runs the Termination, making a TimeSeries of output from this Termination
available from getOutput().
|
void |
setModulatory(boolean modulatory) |
void |
setTau(float tau) |
void |
setValues(InstantaneousOutput values) |
public BasicTermination(Node node, DynamicalSystem dynamics, Integrator integrator, java.lang.String name)
node
- Node that owns this terminationdynamics
- Dynamical System that defines the dynamicsintegrator
- Integrator for the DSname
- Name of the terminationpublic int getDimensions()
getDimensions
in interface Termination
Termination.getDimensions()
public java.lang.String getName()
getName
in interface Termination
Termination.getName()
public void setValues(InstantaneousOutput values) throws SimulationException
setValues
in interface Termination
values
- InstantaneousOutput (eg from another Ensemble) to apply to this Termination.SimulationException
- if the given values have the wrong dimensionTermination.setValues(ca.nengo.model.InstantaneousOutput)
public void run(float startTime, float endTime) throws SimulationException
startTime
- simulation time at which running starts (s)endTime
- simulation time at which running ends (s)SimulationException
- if a problem is encountered while trying to runpublic TimeSeries getOutput()
public Node getNode()
getNode
in interface Termination
Termination.getNode()
public void reset(boolean randomize)
reset
in interface Resettable
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.Resettable.reset(boolean)
public boolean getModulatory()
getModulatory
in interface Termination
Termination.getModulatory()
public float getTau()
getTau
in interface Termination
Termination.getTau()
public void setModulatory(boolean modulatory)
setModulatory
in interface Termination
modulatory
- True if the Termination is to be modulatoryTermination.setModulatory(boolean)
public void setTau(float tau) throws StructuralException
setTau
in interface Termination
tau
- Time constant of dominant dynamicsStructuralException
- if the time constant cannot be changedTermination.setTau(float)
public InstantaneousOutput getInput()
getInput
in interface Termination
public BasicTermination clone() throws java.lang.CloneNotSupportedException
clone
in interface Termination
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be madepublic BasicTermination clone(Node node) throws java.lang.CloneNotSupportedException
Termination
clone
in interface Termination
node
- New parent nodejava.lang.CloneNotSupportedException
- if clone cannot be made