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.
Modifier and Type | Class and Description |
---|---|
static class |
LinearSynapticIntegrator.Factory
Factory for making LinearSynapticIntegrators
|
Constructor and Description |
---|
LinearSynapticIntegrator()
Defaults to max timestep 1ms and units Units.ACU.
|
LinearSynapticIntegrator(float maxTimeStep,
Units currentUnits) |
Modifier and Type | Method and Description |
---|---|
Termination |
addTermination(java.lang.String name,
float[] weights,
float tauPSC,
boolean modulatory) |
Termination |
addTermination(java.lang.String name,
float[] weights,
float tauPSC,
float delay,
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).
|
public LinearSynapticIntegrator(float maxTimeStep, Units currentUnits)
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(...)public LinearSynapticIntegrator()
public TimeSeries1D run(float startTime, float endTime)
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.
run
in interface SynapticIntegrator
startTime
- Simulation time at which running starts (s)endTime
- Simulation time at which running ends (s)SynapticIntegrator.run(float, float)
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 getMaxTimeStep()
public void setMaxTimeStep(float maxTimeStep)
maxTimeStep
- maximum time steppublic Units getCurrentUnits()
public void setCurrentUnits(Units units)
units
- Units that current should be expressed inpublic Termination[] getTerminations()
getTerminations
in interface SynapticIntegrator
SynapticIntegrator.getTerminations()
public Termination addTermination(java.lang.String name, float[] weights, float tauPSC, boolean modulatory) throws StructuralException
addTermination
in interface ExpandableSynapticIntegrator
name
- Name of Terminationweights
- Synaptic weights associated with this TerminationtauPSC
- 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).StructuralException
- if there is already a Termination of the same name on this
SynapticIntegratorExpandableSynapticIntegrator.addTermination(java.lang.String, float[], float, boolean)
public Termination addTermination(java.lang.String name, float[] weights, float tauPSC, float delay, boolean modulatory) throws StructuralException
StructuralException
public Termination removeTermination(java.lang.String name) throws StructuralException
removeTermination
in interface ExpandableSynapticIntegrator
name
- Name of Termination to remove.StructuralException
- if there is no Termination of the given name on this
SynapticIntegratorExpandableSynapticIntegrator.removeTermination(java.lang.String)
public Termination getTermination(java.lang.String name) throws StructuralException
getTermination
in interface SynapticIntegrator
name
- Name of a Termination onto this SynapticIntegratorStructuralException
- if the named Termination does not existSynapticIntegrator.getTermination(java.lang.String)
public void setNode(Node node)
SynapticIntegrator
setNode
in interface SynapticIntegrator
node
- The parent node (Terminations need a reference to this)public LinearSynapticIntegrator clone() throws java.lang.CloneNotSupportedException
clone
in interface ExpandableSynapticIntegrator
clone
in interface SynapticIntegrator
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be made