ca.nengo.model.neuron.impl
Class PlasticExpandableSpikingNeuron

java.lang.Object
  extended by ca.nengo.model.neuron.impl.SpikingNeuron
      extended by ca.nengo.model.neuron.impl.PlasticExpandableSpikingNeuron
All Implemented Interfaces:
ExpandableNode, NEFNode, Neuron, Node, Plastic, Probeable, Resettable, SimulationMode.ModeConfigurable, VisiblyMutable, java.io.Serializable, java.lang.Cloneable

public class PlasticExpandableSpikingNeuron
extends SpikingNeuron
implements Plastic, ExpandableNode

A SpikingNeuron with an ExpandableSynapticIntegrator that is Plastic.

Author:
Bryan Tripp
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent
 
Field Summary
 
Fields inherited from class ca.nengo.model.neuron.impl.SpikingNeuron
CURRENT
 
Fields inherited from interface ca.nengo.model.neuron.Neuron
AXON
 
Constructor Summary
PlasticExpandableSpikingNeuron(SynapticIntegrator integrator, SpikeGenerator generator, float scale, float bias, java.lang.String name)
          Note: current = scale * (weighted sum of inputs at each termination) * (radial input) + bias.
 
Method Summary
 Termination addTermination(java.lang.String name, float[][] weights, float tauPSC, boolean modulatory)
          Adds a new Termination onto this Node.
 int getDimension()
           
 float getPlasticityInterval()
           
 PlasticityRule getPlasticityRule(java.lang.String terminationName)
           
 java.lang.String[] getPlasticityRuleNames()
           
 void removeTermination(java.lang.String name)
           
 void run(float startTime, float endTime)
          Runs the Node (including all its components), updating internal state and outputs as needed.
 void setPlasticityInterval(float time)
           
 void setPlasticityRule(java.lang.String terminationName, PlasticityRule rule)
           
 
Methods inherited from class ca.nengo.model.neuron.impl.SpikingNeuron
addChangeListener, clone, getBias, getDocumentation, getGenerator, getHistory, getIntegrator, getMode, getName, getOrigin, getOrigins, getScale, getTermination, getTerminations, listStates, removeChangeListener, reset, setBias, setDocumentation, setGenerator, setIntegrator, setMode, setName, setRadialInput, setScale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.nengo.model.Node
clone, getDocumentation, getName, getOrigin, getOrigins, getTermination, getTerminations, setDocumentation, setName
 
Methods inherited from interface ca.nengo.model.Resettable
reset
 
Methods inherited from interface ca.nengo.model.SimulationMode.ModeConfigurable
getMode, setMode
 
Methods inherited from interface ca.nengo.util.VisiblyMutable
addChangeListener, removeChangeListener
 

Constructor Detail

PlasticExpandableSpikingNeuron

public PlasticExpandableSpikingNeuron(SynapticIntegrator integrator,
                                      SpikeGenerator generator,
                                      float scale,
                                      float bias,
                                      java.lang.String name)
Note: current = scale * (weighted sum of inputs at each termination) * (radial input) + bias.

Parameters:
integrator - SynapticIntegrator used to model dendritic/somatic integration of inputs to this Neuron (must be Plastic)
generator - SpikeGenerator used to model spike generation at the axon hillock of this Neuron
scale - A coefficient that scales summed input
bias - A bias current that models unaccounted-for inputs and/or intrinsic currents
name - A unique name for this neuron in the context of the Network or Ensemble to which it belongs
Method Detail

run

public void run(float startTime,
                float endTime)
         throws SimulationException
Description copied from interface: Node
Runs the Node (including all its components), updating internal state and outputs as needed. Runs should be short (eg 1ms), because inputs can not be changed during a run, and outputs will only be communicated to other Nodes after a run.

Specified by:
run in interface Node
Overrides:
run in class SpikingNeuron
Parameters:
startTime - simulation time at which running starts (s)
endTime - simulation time at which running ends (s)
Throws:
SimulationException - if a problem is encountered while trying to run
See Also:
SpikingNeuron.run(float, float)

setPlasticityRule

public void setPlasticityRule(java.lang.String terminationName,
                              PlasticityRule rule)
                       throws StructuralException
Specified by:
setPlasticityRule in interface Plastic
Parameters:
terminationName - Name of termination to which plasticity rule applies.
rule - A rule that defines how the termination's transformation matrix elements change during simulation
Throws:
StructuralException - if the named Termination does not exist
See Also:
Plastic.setPlasticityRule(java.lang.String, ca.nengo.model.plasticity.PlasticityRule)

setPlasticityInterval

public void setPlasticityInterval(float time)
Specified by:
setPlasticityInterval in interface Plastic
Parameters:
time - Period after which plasticity rules are evaluated (defaults to every time step).
See Also:
Plastic.setPlasticityInterval(float)

addTermination

public Termination addTermination(java.lang.String name,
                                  float[][] weights,
                                  float tauPSC,
                                  boolean modulatory)
                           throws StructuralException
Description copied from interface: ExpandableNode
Adds a new Termination onto this Node.

Specified by:
addTermination in interface ExpandableNode
Parameters:
name - Unique name for the Termination (in the scope of this Node)
weights - Connection weights. Length must equal getDimension(). Each component must have length equal to the dimension of the Origin that will connect to this Termination.
tauPSC - Time constant with which incoming signals are filtered. (All Terminations have this property, but it may have slightly different interpretations per implementation.)
modulatory - If true, inputs to the Termination are not summed with other inputs (they only have modulatory effects, eg on plasticity, which must be defined elsewhere).
Returns:
resulting Termination
Throws:
StructuralException - if length of weights doesn't equal getDimension(), or if there are different numbers of weights given in different rows.
See Also:
ExpandableNode.addTermination(java.lang.String, float[][], float, boolean)

getDimension

public int getDimension()
Specified by:
getDimension in interface ExpandableNode
Returns:
Output dimension of Terminations onto this Node
See Also:
ExpandableNode.getDimension()

removeTermination

public void removeTermination(java.lang.String name)
                       throws StructuralException
Specified by:
removeTermination in interface ExpandableNode
Parameters:
name - Name of Termination to remove.
Throws:
StructuralException
See Also:
ExpandableNode.removeTermination(java.lang.String)

getPlasticityInterval

public float getPlasticityInterval()
Specified by:
getPlasticityInterval in interface Plastic
Returns:
Period after which plasticity rules are evaluated (defaults to every time step).
See Also:
Plastic.getPlasticityInterval()

getPlasticityRule

public PlasticityRule getPlasticityRule(java.lang.String terminationName)
                                 throws StructuralException
Specified by:
getPlasticityRule in interface Plastic
Parameters:
terminationName - Name of termination to which plasticity rule applies.
Returns:
A rule that defines how the termination's transformation matrix elements change during simulation
Throws:
StructuralException - if the named Termination does not exist
See Also:
Plastic.getPlasticityRule(java.lang.String)

getPlasticityRuleNames

public java.lang.String[] getPlasticityRuleNames()
Specified by:
getPlasticityRuleNames in interface Plastic
Returns:
Names of Terminations for which plasticity rules can be set
See Also:
Plastic.getPlasticityRuleNames()