ca.nengo.model.plasticity.impl
Class PlasticEnsembleTermination
java.lang.Object
ca.nengo.model.impl.EnsembleTermination
ca.nengo.model.plasticity.impl.PlasticEnsembleTermination
- All Implemented Interfaces:
- Resettable, Termination, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- ModulatedPlasticEnsembleTermination, STDPTermination
public abstract class PlasticEnsembleTermination
- extends EnsembleTermination
A Termination that is composed of Terminations onto multiple Nodes.
The dimensions of the Terminations onto each Node must be the same.
Physiologically, this might correspond to a set of n axons passing into
a neuron pool. Each neuron in the pool receives synaptic connections
from as many as n of these axons (zero weight is equivalent to no
connection). Sometimes we deal with this set of axons only in terms
of the branches they send to one specific Neuron (a Node-level Termination)
but here we deal with all branches (an Ensemble-level Termination).
In either case the spikes transmitted by the axons are the same.
TODO: test
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myLearningRate
protected float myLearningRate
myLearning
protected boolean myLearning
myOriginName
protected java.lang.String myOriginName
myOutput
protected float[] myOutput
PlasticEnsembleTermination
public PlasticEnsembleTermination(Node node,
java.lang.String name,
PlasticNodeTermination[] nodeTerminations)
throws StructuralException
- Parameters:
node
- The parent Nodename
- Name of this TerminationnodeTerminations
- Node-level Terminations that make up this Termination. Must be
all LinearExponentialTerminations
- Throws:
StructuralException
- If dimensions of different terminations are not all the same
getOriginName
public java.lang.String getOriginName()
- Returns:
- Name of Origin from which postsynaptic activity is drawn
setOriginName
public void setOriginName(java.lang.String originName)
- Parameters:
originName
- Name of Origin from which postsynaptic activity is drawn
setOriginState
public void setOriginState(java.lang.String name,
InstantaneousOutput state,
float time)
throws StructuralException
- Parameters:
name
- Name of Origin from which postsynaptic activity is drawnstate
- State of named origintime
- Current time
- Throws:
StructuralException
- if Origin is not set
getTransform
public float[][] getTransform()
- Returns:
- The transformation matrix, which is made up of the
weight vectors for each of the PlasticNodeTerminations within.
This can be thought of as the connection weight matrix in most cases.
setTransform
public void setTransform(float[][] transform,
boolean save)
- Parameters:
transform
- The transformation matrix, which can be thought of as
the connection weight matrix in most cases. This will be passed through
to set the weight vectors on each PlasticNodeTermination within.
saveTransform
public void saveTransform()
- Saves the weights in the PlasticNodeTerminations within.
reset
public void reset(boolean randomize)
- Specified by:
reset
in interface Resettable
- Overrides:
reset
in class EnsembleTermination
- Parameters:
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.- See Also:
Resettable.reset(boolean)
updateTransform
public abstract void updateTransform(float time,
int start,
int end)
throws StructuralException
- Parameters:
time
- Current timestart
- The start index of the range of transform values to update (for multithreading)end
- The end index of the range of transform values to update (for multithreading)
- Throws:
StructuralException
- if
getInput
public InstantaneousOutput getInput()
- Specified by:
getInput
in interface Termination
- Overrides:
getInput
in class EnsembleTermination
- Returns:
- Latest input to the underlying terminations.
- See Also:
EnsembleTermination.getInput()
getOutputs
public float[] getOutputs()
- Returns:
- The output currents from the PlasticNodeTermination being wrapped
getLearningRate
public float getLearningRate()
- Returns:
- Learning rate of the termination
setLearningRate
public void setLearningRate(float learningRate)
- Parameters:
learningRate
- Learning rate of the termination
getLearning
public boolean getLearning()
- Returns:
- Whether or not the termination is currently learning
setLearning
public void setLearning(boolean learning)
- Parameters:
learning
- Turn learning on or off for this termination
clone
public PlasticEnsembleTermination clone(Node node)
throws java.lang.CloneNotSupportedException
- Description copied from interface:
Termination
- Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
- Specified by:
clone
in interface Termination
- Overrides:
clone
in class EnsembleTermination
- Parameters:
node
- New parent node
- Returns:
- A clone of the termination for the new parent ensemble
- Throws:
java.lang.CloneNotSupportedException
- if clone cannot be made