public class LinearExponentialTermination extends java.lang.Object implements PlasticNodeTermination
A Termination at which incoming spikes induce exponentially decaying post-synaptic currents that are combined linearly. Real-valued spike rate inputs have approximately the same effect over time as actual (boolean) spike inputs at the same rate.
Each input is weighted (weights specified in the constructor) so that the time integral of the post-synaptic current arising from one spike equals the weight. The time integral of post-synaptic current arising from real-valued input of 1 over a period of 1s also equals the weight. This means that spike input and spike-rate input have roughly the same effects.
Constructor and Description |
---|
LinearExponentialTermination(Node node,
java.lang.String name,
float[] weights,
float tauPSC) |
Modifier and Type | Method and Description |
---|---|
LinearExponentialTermination |
clone() |
LinearExponentialTermination |
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() |
float |
getOutput() |
float |
getTau() |
float[] |
getWeightProbabilities() |
float[] |
getWeights() |
void |
modifyWeights(float[] change,
boolean save)
This modifies the weights in-place, rather than creating new ones, so will usually
be faster than calling setWeights.
|
void |
reset(boolean randomize)
Resets current to 0 (randomize arg is ignored).
|
void |
saveWeights()
Save the current state of the weights so it can be reset there
|
void |
setModulatory(boolean modulatory) |
void |
setNode(Node node) |
void |
setTau(float tau) |
void |
setValues(InstantaneousOutput values) |
void |
setWeightProbabilities(float[] probs) |
void |
setWeights(float[] weights,
boolean save) |
float |
updateCurrent(boolean applySpikes,
float integrationTime,
float decayTime)
Updates net post-synaptic current for this Termination according to new inputs and exponential
dynamics applied to previous inputs.
|
public LinearExponentialTermination(Node node, java.lang.String name, float[] weights, float tauPSC)
node
- The parent Nodename
- Name of the Termination (must be unique within the Neuron or Ensemble to
which it is attached)weights
- Ordered list of synaptic weights of each input channeltauPSC
- Time constant of exponential post-synaptic current decaypublic 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 void saveWeights()
PlasticNodeTermination
saveWeights
in interface PlasticNodeTermination
public java.lang.String getName()
getName
in interface Termination
Termination.getName()
public int getDimensions()
getDimensions
in interface Termination
Termination.getDimensions()
public float[] getWeights()
getWeights
in interface PlasticNodeTermination
public void setWeights(float[] weights, boolean save)
setWeights
in interface PlasticNodeTermination
weights
- The new synaptic weights for each input channelsave
- Should the weights be saved for resetting purposes?public void modifyWeights(float[] change, boolean save)
modifyWeights
in interface PlasticNodeTermination
change
- The change in the synaptic weights for each input channelsave
- Should the weights be saved for resetting purposes?public void setWeightProbabilities(float[] probs)
probs
- The new synaptic vesicle release probabilities for each input channelpublic float[] getWeightProbabilities()
public InstantaneousOutput getInput()
getInput
in interface PlasticNodeTermination
getInput
in interface Termination
public float getOutput()
getOutput
in interface PlasticNodeTermination
public void setValues(InstantaneousOutput values) throws SimulationException
setValues
in interface Termination
values
- Can be either SpikeOutput or RealOutputSimulationException
- if the given values have the wrong dimensionTermination.setValues(ca.nengo.model.InstantaneousOutput)
public float updateCurrent(boolean applySpikes, float integrationTime, float decayTime)
The essential points are that spikes are only applied once during a network time step, and that the total integration and decay times over a network time step both equal the length of the network time step.
applySpikes
- True if spike inputs are to be appliedintegrationTime
- Time over which real-valued inputs are to be integrateddecayTime
- Time over which post-synaptic currents are to decaypublic Node getNode()
getNode
in interface Termination
Termination.getNode()
public void setNode(Node node)
node
- Parent nodepublic 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 LinearExponentialTermination clone() throws java.lang.CloneNotSupportedException
clone
in interface PlasticNodeTermination
clone
in interface Termination
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be madepublic LinearExponentialTermination clone(Node node) throws java.lang.CloneNotSupportedException
Termination
clone
in interface PlasticNodeTermination
clone
in interface Termination
node
- New parent nodejava.lang.CloneNotSupportedException
- if clone cannot be made