|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.nengo.model.neuron.impl.PoissonSpikeGenerator
public class PoissonSpikeGenerator
A phenomenological SpikeGenerator that produces spikes according to a Poisson process with a rate that varies as a function of current. TODO: test
Nested Class Summary | |
---|---|
static class |
PoissonSpikeGenerator.LinearFactory
Creates PoissonSpikeGenerators with linear response functions. |
static class |
PoissonSpikeGenerator.LinearNeuronFactory
A factory for neurons with linear or rectified linear response functions. |
static class |
PoissonSpikeGenerator.SigmoidFactory
|
static class |
PoissonSpikeGenerator.SigmoidNeuronFactory
A factory for neurons with sigmoid response functions. |
Constructor Summary | |
---|---|
PoissonSpikeGenerator()
Uses a default sigmoid rate function |
|
PoissonSpikeGenerator(Function rateFunction)
|
Method Summary | |
---|---|
SpikeGenerator |
clone()
|
SimulationMode |
getMode()
|
Function |
getRateFunction()
|
static void |
main(java.lang.String[] args)
|
void |
reset(boolean randomize)
This method does nothing, because a Poisson process is stateless. |
InstantaneousOutput |
run(float[] time,
float[] current)
Runs the model for a given time segment. |
void |
setMode(SimulationMode mode)
Sets the object to run in either the given mode or the closest mode that it supports (all ModeConfigurables must support SimulationMode.DEFAULT, and must default to this mode). |
void |
setRateFunction(Function function)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PoissonSpikeGenerator(Function rateFunction)
rateFunction
- Maps input current to Poisson spiking ratepublic PoissonSpikeGenerator()
Method Detail |
---|
public Function getRateFunction()
public void setRateFunction(Function function)
function
- Function that maps input current to Poisson spiking ratepublic InstantaneousOutput run(float[] time, float[] current)
SpikeGenerator
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({.001 .002}, ...) and then run({.501 .502}, ...), the results may not make any sense, but this is not the model's responsibility. Absolute times are provided to support explicitly time-varying models, and for the convenience of Probeable models.
run
in interface SpikeGenerator
time
- Array of points in time at which input current is defined. This includes
at least the start and end times, and possibly intermediate times. (The SpikeGenerator
model can use its own time step -- these times are only used to define the input.)current
- Driving current at each given point in time (assumed to be constant
until next time point)
SpikeGenerator.run(float[], float[])
public SimulationMode getMode()
getMode
in interface SimulationMode.ModeConfigurable
SimulationMode.ModeConfigurable.getMode()
public void setMode(SimulationMode mode)
SimulationMode.ModeConfigurable
setMode
in interface SimulationMode.ModeConfigurable
mode
- SimulationMode in which it is desired that the object runs.SimulationMode.ModeConfigurable.setMode(ca.nengo.model.SimulationMode)
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 SpikeGenerator clone() throws java.lang.CloneNotSupportedException
clone
in interface SpikeGenerator
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |