#include <LifNeuron.h>
Public Member Functions | |
LifNeuronBase (float Rm=1e6, float Cm=3e-8, float Vresting=-0.06, float Vthresh=-0.045, float Vreset=-0.06, float Vinit=-0.06, float Trefract=3e-3, float Inoise=0.0, float Iinject=0.0) | |
virtual | ~LifNeuronBase () |
virtual int | reset (double dt) |
Reset the leaky I&F neuron. | |
bool | refractoryQ () |
Returns true iff the neuron is in its absolute refactory period. | |
virtual void | clearSynapticInput (void)=0 |
virtual double | getVm () |
Get the current membrane voltage. | |
virtual double | getManagedDelay () const |
virtual int | nSpikeInputPorts () const |
virtual int | nSpikeOutputPorts () const |
virtual int | nAnalogInputPorts () const |
virtual int | nAnalogOutputPorts () const |
virtual PortType | outputPortType (port_t o) const |
virtual PortType | inputPortType (port_t i) const |
virtual double | currentNoiseInput () |
Public Attributes | |
float | Rm |
The membrane resistance [units=Ohm; range=(0,1e30)]. | |
float | Cm |
The membrane capacity [range=(0,1); units=F;]. | |
float | Vresting |
The resting membrane voltage. [units=V; range=(-1,1);]. | |
float | Vthresh |
If exceeds a spike is emmited. [units=V; range=(-10,100);]. | |
float | Vreset |
The voltage to reset to after a spike. [units=V; range=(-1,1);]. | |
float | Vinit |
The initial condition for at time . [units=V; range=(-1,1);]. | |
float | Trefract |
The length of the absolute refractory period. [units=sec; range=(0,1);]. | |
float | Inoise |
The standard deviation of the noise to be added each integration time constant. [range=(0,1); units=A;]. | |
float | Iinject |
A constant current to be injected into the LIF neuron. [units=A; range=(-1,1);]. | |
Protected Attributes | |
double | Vm |
The membrane voltage [readonly; units=V;]. | |
int | nStepsInRefr |
If positive then this counter tells us how many time steps we are still in the absolute refractory period. | |
double | C1 |
Internal constants for the exponential Euler integration of Vm. | |
double | C2 |
double | I0 |
double | _dt |
The time step. | |
Static Protected Attributes | |
static ThreadSpecificRandomDistribution < NormalDistribution > | noise_gen |
Random number generator for the noise. |
A standard leaky-integrate-and-fire neuron model is implemented where the membrane potential of a neuron is given by
where is the membrane time constant, is the membrane resistance, is the current supplied by the synapses, is a non-specific background current and is a Gaussion random variable with zero mean and a given variance noise.
At time ist set to . If exceeds the threshold voltage it is reset to and hold there for the length of the absolute refractory period.
The exponential Euler method is used for numerical integration.
Definition at line 43 of file LifNeuron.h.
LifNeuronBase::LifNeuronBase | ( | float | Rm = 1e6 , |
|
float | Cm = 3e-8 , |
|||
float | Vresting = -0.06 , |
|||
float | Vthresh = -0.045 , |
|||
float | Vreset = -0.06 , |
|||
float | Vinit = -0.06 , |
|||
float | Trefract = 3e-3 , |
|||
float | Inoise = 0.0 , |
|||
float | Iinject = 0.0 | |||
) |
Definition at line 16 of file LifNeuron.cpp.
virtual LifNeuronBase::~LifNeuronBase | ( | ) | [inline, virtual] |
Definition at line 56 of file LifNeuron.h.
Reset the leaky I&F neuron.
Reimplemented from SimObject.
Reimplemented in LIFCurrAlphaNeuron, LIFCurrExpNeuron, LIFCondAlphaNeuron, LIFCondExpNeuron, CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 24 of file LifNeuron.cpp.
References SimObject::adjust(), clearSynapticInput(), nStepsInRefr, SingleOutputSpikeSender::reset(), Vinit, and Vm.
bool LifNeuronBase::refractoryQ | ( | ) | [inline] |
Returns true iff the neuron is in its absolute refactory period.
Definition at line 65 of file LifNeuron.h.
References nStepsInRefr.
virtual void LifNeuronBase::clearSynapticInput | ( | void | ) | [pure virtual] |
virtual double LifNeuronBase::getVm | ( | ) | [inline, virtual] |
Get the current membrane voltage.
Reimplemented in CbLifNeuron.
Definition at line 98 of file LifNeuron.h.
References Vm.
virtual double LifNeuronBase::getManagedDelay | ( | ) | const [inline, virtual] |
virtual int LifNeuronBase::nSpikeInputPorts | ( | ) | const [inline, virtual] |
Reimplemented from SimObject.
Reimplemented in CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 104 of file LifNeuron.h.
virtual int LifNeuronBase::nSpikeOutputPorts | ( | ) | const [inline, virtual] |
Reimplemented from SimObject.
Reimplemented in CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 105 of file LifNeuron.h.
virtual int LifNeuronBase::nAnalogInputPorts | ( | ) | const [inline, virtual] |
Reimplemented from SimObject.
Reimplemented in DARecvLifNeuron, DARecvCbLifNeuron, CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 106 of file LifNeuron.h.
virtual int LifNeuronBase::nAnalogOutputPorts | ( | ) | const [inline, virtual] |
Reimplemented from SimObject.
Reimplemented in CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 107 of file LifNeuron.h.
Reimplemented from SimObject.
Reimplemented in CompositeNeuron< CbLifNeuron >, and CompositeNeuron< LifNeuron >.
Definition at line 108 of file LifNeuron.h.
References SimObject::spiking, and SimObject::undefined.
Reimplemented from SimObject.
Reimplemented in DARecvLifNeuron, and DARecvCbLifNeuron.
Definition at line 112 of file LifNeuron.h.
References SimObject::undefined.
virtual double LifNeuronBase::currentNoiseInput | ( | ) | [inline, virtual] |
Definition at line 118 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), and LifNeuron::advance().
The membrane resistance [units=Ohm; range=(0,1e30)].
Definition at line 70 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), CbLifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), LIFCurrExpNeuron::LIFCurrExpNeuron(), LIFCondExpNeuron::reset(), LIFCondAlphaNeuron::reset(), LIFCurrExpNeuron::reset(), and LIFCurrAlphaNeuron::reset().
The membrane capacity [range=(0,1); units=F;].
Definition at line 73 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), CbLifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), LIFCurrExpNeuron::LIFCurrExpNeuron(), LIFCondExpNeuron::reset(), LIFCondAlphaNeuron::reset(), LIFCurrExpNeuron::reset(), and LIFCurrAlphaNeuron::reset().
The resting membrane voltage. [units=V; range=(-1,1);].
Definition at line 76 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
If exceeds a spike is emmited. [units=V; range=(-10,100);].
Definition at line 79 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
The voltage to reset to after a spike. [units=V; range=(-1,1);].
Definition at line 82 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
The initial condition for at time . [units=V; range=(-1,1);].
Definition at line 85 of file LifNeuron.h.
Referenced by LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), LIFCurrExpNeuron::LIFCurrExpNeuron(), and reset().
The length of the absolute refractory period. [units=sec; range=(0,1);].
Definition at line 88 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
The standard deviation of the noise to be added each integration time constant. [range=(0,1); units=A;].
Definition at line 91 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
A constant current to be injected into the LIF neuron. [units=A; range=(-1,1);].
Definition at line 94 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), LIFCondAlphaNeuron::LIFCondAlphaNeuron(), LIFCondExpNeuron::LIFCondExpNeuron(), LIFCurrAlphaNeuron::LIFCurrAlphaNeuron(), and LIFCurrExpNeuron::LIFCurrExpNeuron().
double LifNeuronBase::Vm [protected] |
The membrane voltage [readonly; units=V;].
Definition at line 125 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), CbLifNeuron::getVm(), getVm(), and reset().
int LifNeuronBase::nStepsInRefr [protected] |
If positive then this counter tells us how many time steps we are still in the absolute refractory period.
Definition at line 128 of file LifNeuron.h.
Referenced by CbLifNeuron::advance(), LifNeuron::advance(), refractoryQ(), and reset().
double LifNeuronBase::C1 [protected] |
Internal constants for the exponential Euler integration of Vm.
Definition at line 131 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), CbLifNeuron::advance(), and LifNeuron::advance().
double LifNeuronBase::C2 [protected] |
Definition at line 131 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), and LifNeuron::advance().
double LifNeuronBase::I0 [protected] |
Definition at line 131 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), CbLifNeuron::advance(), and LifNeuron::advance().
double LifNeuronBase::_dt [protected] |
The time step.
Definition at line 134 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), and CbLifNeuron::advance().
ThreadSpecificRandomDistribution< NormalDistribution > LifNeuronBase::noise_gen [static, protected] |
Random number generator for the noise.
Definition at line 137 of file LifNeuron.h.
Referenced by CbLifNeuron::adjust(), LifNeuron::adjust(), CbLifNeuron::advance(), and LifNeuron::advance().