00001
00005 #ifndef _AEIFNEURON_H_
00006 #define _AEIFNEURON_H_
00007
00008 #include "InputTargetTypes.h"
00009 #include "SpikeSender.h"
00010 #include "SimObject.h"
00011 #include "ThreadSpecificRandomDistribution.h"
00012
00013
00015
00024 class aEIFNeuronBase : public SimObject, public SingleOutputSpikeSender
00025 {
00026 public:
00027 aEIFNeuronBase(double a = 4e-9,
00028 double b = 0.0805e-9,
00029 double Vt = -50.6e-3,
00030 double Vr = -70.4e-3,
00031 double El = -70.4e-3,
00032 double gl = 30e-9,
00033 double Cm = 281e-12,
00034 double tau_w = 144e-3,
00035 double slope = 2e-3,
00036 double Vpeak = 20.0e-3,
00037 double Vinit = -60.0e-3,
00038 double Inoise = 0.0,
00039 double Iinject = 0.0);
00040
00041 virtual ~aEIFNeuronBase()
00042 {
00043
00044 }
00045
00046 virtual int adjust(double dt);
00047
00049 virtual int advance(AdvanceInfo const &);
00050
00052 virtual int reset(double dt);
00053
00055 inline bool refractoryQ()
00056 {
00057 return false;
00058 }
00059
00060 virtual void clearSynapticInput(void);
00061
00062
00064 double a;
00066 double b;
00068 double Vt;
00070 double Vr;
00072 double El;
00074 double gl;
00076 double Cm;
00078 double tau_w;
00080 double slope;
00081
00083 double Vpeak;
00085 double Vinit;
00087 double Inoise;
00089 double Iinject;
00090
00091 virtual double getManagedDelay() const { return 0; }
00092 virtual int nSpikeInputPorts() const { return 0; };
00093 virtual int nSpikeOutputPorts() const { return 1; };
00094 virtual int nAnalogInputPorts() const { return 0; };
00095 virtual int nAnalogOutputPorts() const { return 0; };
00096
00097 virtual PortType outputPortType(port_t o) const
00098 {
00099 if( o==0) return spiking; else return undefined;
00100 };
00101
00102 virtual PortType inputPortType(port_t i) const
00103 {
00104 return undefined;
00105 };
00106
00107 protected:
00109 double Vm;
00111 double w;
00113 double _dt;
00114
00116 static ThreadSpecificRandomDistribution< NormalDistribution > white_noise;
00117
00119
00120
00122 int noiseType;
00124 double Isyn;
00125
00126 protected:
00127 double factI;
00128 };
00129
00130
00132
00141 class aEIFNeuron : public aEIFNeuronBase, public CurrentInputTarget
00142 {
00143 SIMOBJECT(aEIFNeuron, AdvancePhase::One)
00144
00145 public:
00146 aEIFNeuron(double a = 4e-9,
00147 double b = 0.0805e-9,
00148 double Vt = -50.6e-3,
00149 double Vr = -70.4e-3,
00150 double El = -70.4e-3,
00151 double gl = 30e-9,
00152 double Cm = 281e-12,
00153 double tau_w = 144e-3,
00154 double slope = 2e-3,
00155 double Vpeak = 20.0e-3,
00156 double Vinit = -60.0e-3,
00157 double Inoise = 0.0,
00158 double Iinject = 0.0);
00159
00160 virtual ~aEIFNeuron() {
00161
00162 }
00163
00164 virtual void currentInput(double Isyn);
00165 };
00166
00167
00168
00170
00179 class CbaEIFNeuron : public aEIFNeuronBase, public ConductanceInputTarget
00180 {
00181 SIMOBJECT(CbaEIFNeuron, AdvancePhase::One)
00182
00183 public:
00184 CbaEIFNeuron(double a = 4e-9,
00185 double b = 0.0805e-9,
00186 double Vt = -50.6e-3,
00187 double Vr = -70.4e-3,
00188 double El = -70.4e-3,
00189 double gl = 30e-9,
00190 double Cm = 281e-12,
00191 double tau_w = 144e-3,
00192 double slope = 2e-3,
00193 double Vpeak = 20.0e-3,
00194 double Vinit = -60.0e-3,
00195 double Inoise = 0.0,
00196 double Iinject = 0.0);
00197
00198 virtual ~CbaEIFNeuron() {
00199
00200 }
00201
00202 virtual void currentInput(double Isyn);
00203 virtual void conductanceInput(double g, double Erev);
00204
00206 virtual double getVm()
00207 {
00208 return Vm;
00209 }
00210 };
00211
00212 #endif