public class DecodedTermination extends java.lang.Object implements Termination, Resettable, Probeable
A Termination of decoded state vectors onto an NEFEnsemble. A DecodedTermination performs a linear transformation on incoming vectors, mapping them into the space of the NEFEnsemble to which this Termination belongs. A DecodedTermination also applies linear PSC dynamics (typically exponential decay) to the resulting vector.
Non-linear dynamics are not allowed at this level. This is because the vector input to an NEFEnsemble only has meaning in terms of the decomposition of synaptic weights into decoding vectors, transformation matrix, and encoding vectors. Linear PSC dynamics actually apply to currents, but if everything is linear we can re-order the dynamics and the encoders for convenience (so that the dynamics seem to operate on the state vectors). In contrast, non-linear dynamics must be modeled within each Neuron, because all inputs to a non-linear dynamical process must be taken into account before the effect of any single input is known.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OUTPUT
Name of Probeable output state.
|
Constructor and Description |
---|
DecodedTermination(Node node,
java.lang.String name,
float[][] transform,
LinearSystem dynamics,
Integrator integrator) |
Modifier and Type | Method and Description |
---|---|
DecodedTermination |
clone() |
DecodedTermination |
clone(Node node)
Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
|
int |
getDimensions() |
LinearSystem |
getDynamics() |
TimeSeries |
getHistory(java.lang.String stateName)
Note that the units of TimeSeries' for a given state do not change over time (ie at different
time steps).
|
float[][] |
getInitialState() |
RealOutput |
getInput() |
boolean |
getModulatory() |
java.lang.String |
getName() |
Node |
getNode() |
float[] |
getOutput()
This method should be called after run(...).
|
DecodedTermination |
getScaling() |
float[] |
getStaticBias() |
float |
getTau() |
float[][] |
getTransform() |
java.util.Properties |
listStates() |
void |
reset(boolean randomize) |
void |
run(float startTime,
float endTime) |
void |
setDynamics(LinearSystem dynamics) |
void |
setInitialState(float[][] state) |
void |
setModulatory(boolean modulatory) |
protected void |
setNode(Node node) |
void |
setScaling(DecodedTermination t) |
void |
setStaticBias(float[] bias) |
void |
setTau(float tau) |
void |
setTransform(float[][] transform) |
void |
setValues(InstantaneousOutput values) |
public static final java.lang.String OUTPUT
public DecodedTermination(Node node, java.lang.String name, float[][] transform, LinearSystem dynamics, Integrator integrator) throws StructuralException
node
- The parent Nodename
- The name of this Terminationtransform
- A matrix that maps input (which has the dimension of this Termination)
onto the state space represented by the NEFEnsemble to which the Termination belongsdynamics
- Post-synaptic current dynamics (single-input single-output). Time-varying
dynamics are OK, but non-linear dynamics don't make sense here, because other
Terminations may input onto the same neurons.integrator
- Numerical integrator with which to solve dynamicsStructuralException
- If dynamics are not SISO or given transform is not a matrixpublic void setStaticBias(float[] bias)
bias
- Intrinsic bias that is added to inputs to this terminationpublic float[] getStaticBias()
public void setValues(InstantaneousOutput values) throws SimulationException
setValues
in interface Termination
values
- Only RealOutput is accepted.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 is to startendTime
- Simulation time at which running is to endSimulationException
public float[] getOutput()
public RealOutput getInput()
getInput
in interface Termination
public java.lang.String getName()
getName
in interface Termination
Termination.getName()
public int getDimensions()
getDimensions
in interface Termination
Termination.getDimensions()
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 float[][] getInitialState()
public void setInitialState(float[][] state)
state
- Initial state of dynamics (dimension of termination output X dimension of dynamics state)public float[][] getTransform()
public void setTransform(float[][] transform) throws StructuralException
transform
- New transformStructuralException
- If the transform is not a matrix or has the wrong sizepublic void setScaling(DecodedTermination t)
t
- Termination to use for scaling?public DecodedTermination getScaling()
public LinearSystem getDynamics()
public void setDynamics(LinearSystem dynamics)
dynamics
- New dynamics for each dimension of this Termination (effective immediately).
This method uses a clone of the given dynamics.public float getTau()
getTau
in interface Termination
public void setTau(float tau) throws StructuralException
setTau
in interface Termination
tau
- New time constant to replace current slowest time constant of dynamicsStructuralException
- if the dynamics of this Termination are not LTI in controllable
canonical formpublic boolean getModulatory()
getModulatory
in interface Termination
Termination.getModulatory()
public void setModulatory(boolean modulatory)
setModulatory
in interface Termination
modulatory
- True if the Termination is to be modulatoryTermination.setModulatory(boolean)
public TimeSeries getHistory(java.lang.String stateName) throws SimulationException
Probeable
getHistory
in interface Probeable
stateName
- A state variable nameSimulationException
- if the Probeable does not have the requested stateProbeable.getHistory(java.lang.String)
public java.util.Properties listStates()
listStates
in interface Probeable
Probeable.listStates()
public Node getNode()
getNode
in interface Termination
Termination.getNode()
protected void setNode(Node node)
public DecodedTermination clone() throws java.lang.CloneNotSupportedException
clone
in interface Termination
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be madepublic DecodedTermination clone(Node node) throws java.lang.CloneNotSupportedException
Termination
clone
in interface Termination
node
- New parent nodejava.lang.CloneNotSupportedException
- if clone cannot be made