Nengo.ca

ca.nengo.model.neuron.impl
Class LinearSynapticIntegrator

java.lang.Object
  extended by ca.nengo.model.neuron.impl.LinearSynapticIntegrator
All Implemented Interfaces:
ExpandableSynapticIntegrator, SynapticIntegrator, Resettable, java.io.Serializable, java.lang.Cloneable

public class LinearSynapticIntegrator
extends java.lang.Object
implements ExpandableSynapticIntegrator

A basic linear SynapticIntegrator model.

Synaptic inputs are individually weighted, passed through decaying exponential dynamics, and summed.

A synaptic weight corresponds to the time integral of the current induced by one spike, or to the time integral of current induced by a real-valued input of 1 over 1 second. Thus a real-valued firing-rate input has roughly the same effect as a series spikes at the same rate. So a simulation can switch between spike and rate inputs, with minimal impact and without the need to modify synaptic weights.

See Also:
Serialized Form

Nested Class Summary
static class LinearSynapticIntegrator.Factory
          Factory for making LinearSynapticIntegrators
 
Constructor Summary
LinearSynapticIntegrator()
          Defaults to max timestep 1ms and units Units.ACU.
LinearSynapticIntegrator(float maxTimeStep, Units currentUnits)
           
 
Method Summary
 Termination addTermination(java.lang.String name, float[] weights, float tauPSC, boolean modulatory)
           
 LinearSynapticIntegrator clone()
           
 Units getCurrentUnits()
           
 float getMaxTimeStep()
           
 Termination getTermination(java.lang.String name)
           
 Termination[] getTerminations()
           
 Termination removeTermination(java.lang.String name)
           
 void reset(boolean randomize)
           
 TimeSeries1D run(float startTime, float endTime)
          Runs the model for a given time interval.
 void setCurrentUnits(Units units)
           
 void setMaxTimeStep(float maxTimeStep)
           
 void setNode(Node node)
          This method should be called by the neuron that incorporates this SynapticIntegrator (Terminations need a reference to this).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearSynapticIntegrator

public LinearSynapticIntegrator(float maxTimeStep,
                                Units currentUnits)
Parameters:
maxTimeStep - Maximum length of integration time step. Shorter steps may be used to better match length of run(...)
currentUnits - Units of current in input weights, scale, bias, and result of run(...)

LinearSynapticIntegrator

public LinearSynapticIntegrator()
Defaults to max timestep 1ms and units Units.ACU.

Method Detail

run

public TimeSeries1D run(float startTime,
                        float endTime)
Description copied from interface: SynapticIntegrator

Runs the model for a given time interval. Input to each Termination should be set prior to calling this method, and is held constant during a run.

The model is responsible for maintaining its internal state, and the state is assumed to be consistent with the start time. That is, if a caller calls run(0, 1, ...) and then run(5, 6, ...), the results may not make any sense, but this is not the model's responsibility. Start and end times are provided to support explicitly time-varying models, and for the convenience of Probeable models.

Note that a run(...) is expected to cover a very short interval of time, e.g. 1/2 ms, during which inputs can be assumed to be constant. Normally a number of neurons in a network will run for this short length of time, possibly with diverse or varying internal time steps, and at the end of this time will communicate spikes to each other and then start again.

Specified by:
run in interface SynapticIntegrator
Parameters:
startTime - Simulation time at which running starts (s)
endTime - Simulation time at which running ends (s)
Returns:
Time series of net current, including at least the start and end times, and optionally other times. Generally speaking additional values should be provided if the current varies substantially during the interval, but it is left to the implementation to interpret 'substantially'.
See Also:
SynapticIntegrator.run(float, float)

reset

public void reset(boolean randomize)
Specified by:
reset in interface Resettable
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)

getMaxTimeStep

public float getMaxTimeStep()
Returns:
maximum time step

setMaxTimeStep

public void setMaxTimeStep(float maxTimeStep)
Parameters:
maxTimeStep - maximum time step

getCurrentUnits

public Units getCurrentUnits()
Returns:
Units that current is expressed in

setCurrentUnits

public void setCurrentUnits(Units units)
Parameters:
units - Units that current should be expressed in

getTerminations

public Termination[] getTerminations()
Specified by:
getTerminations in interface SynapticIntegrator
Returns:
List of distinct inputs (eg sets of synapses from different ensembles).
See Also:
SynapticIntegrator.getTerminations()

addTermination

public Termination addTermination(java.lang.String name,
                                  float[] weights,
                                  float tauPSC,
                                  boolean modulatory)
                           throws StructuralException
Specified by:
addTermination in interface ExpandableSynapticIntegrator
Parameters:
name - Name of Termination
weights - Synaptic weights associated with this Termination
tauPSC - Time constant of post-synaptic current decay (all Terminations have this property but it may have slightly different interpretations depending on the SynapticIntegrator or other properties of the Termination).
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 there is already a Termination of the same name on this SynapticIntegrator
See Also:
ExpandableSynapticIntegrator.addTermination(java.lang.String, float[], float, boolean)

removeTermination

public Termination removeTermination(java.lang.String name)
                              throws StructuralException
Specified by:
removeTermination in interface ExpandableSynapticIntegrator
Parameters:
name - Name of Termination to remove.
Returns:
The removed Termination
Throws:
StructuralException - if there is no Termination of the given name on this SynapticIntegrator
See Also:
ExpandableSynapticIntegrator.removeTermination(java.lang.String)

getTermination

public Termination getTermination(java.lang.String name)
                           throws StructuralException
Specified by:
getTermination in interface SynapticIntegrator
Parameters:
name - Name of a Termination onto this SynapticIntegrator
Returns:
The named Termination if it exists
Throws:
StructuralException - if the named Termination does not exist
See Also:
SynapticIntegrator.getTermination(java.lang.String)

setNode

public void setNode(Node node)
Description copied from interface: SynapticIntegrator
This method should be called by the neuron that incorporates this SynapticIntegrator (Terminations need a reference to this).

Specified by:
setNode in interface SynapticIntegrator
Parameters:
node - The parent node (Terminations need a reference to this)

clone

public LinearSynapticIntegrator clone()
                               throws java.lang.CloneNotSupportedException
Specified by:
clone in interface ExpandableSynapticIntegrator
Specified by:
clone in interface SynapticIntegrator
Overrides:
clone in class java.lang.Object
Returns:
Valid clone
Throws:
java.lang.CloneNotSupportedException - if clone can't be made

Nengo.ca