00001
00005 #ifndef _IZHINEURON_H_
00006 #define _IZHINEURON_H_
00007
00008 #include "InputTargetTypes.h"
00009 #include "SpikeSender.h"
00010 #include "SimObject.h"
00011 #include "ThreadSpecificRandomDistribution.h"
00012
00013
00014
00016
00024 class IzhiNeuronBase : public SimObject, public SingleOutputSpikeSender
00025 {
00026 public:
00027 IzhiNeuronBase(double a = 0.02,
00028 double b = 0.2,
00029 double c = -65.0,
00030 double d = 8.0,
00031 double Vpeak = 30.0,
00032 double Vinit = -0.06,
00033 double Inoise = 0.0,
00034 double Iinject = 0.0,
00035 double factI = 1.0);
00036
00037 IzhiNeuronBase(string type,
00038 double Vinit = -0.06,
00039 double Inoise = 0.0,
00040 double Iinject = 0.0,
00041 double factI = 1.0);
00042
00043 virtual ~IzhiNeuronBase()
00044 {
00045
00046 }
00047
00048 virtual int adjust(double dt);
00049
00051 virtual int advance(AdvanceInfo const &);
00052
00054 virtual int reset(double dt);
00055
00057 inline bool refractoryQ()
00058 {
00059 return false;
00060 }
00061
00062 virtual void clearSynapticInput(void);
00063
00065 double Vpeak;
00067 double Vinit;
00069 double Inoise;
00071 double Iinject;
00072
00073
00075 double a;
00077 double b;
00079 double c;
00081 double d;
00082
00083 virtual double getManagedDelay() const { return 0; }
00084 virtual int nSpikeInputPorts() const { return 0; };
00085 virtual int nSpikeOutputPorts() const { return 1; };
00086 virtual int nAnalogInputPorts() const { return 0; };
00087 virtual int nAnalogOutputPorts() const { return 0; };
00088
00089 virtual PortType outputPortType(port_t o) const
00090 {
00091 if( o==0) return spiking; else return undefined;
00092 }
00093
00094 virtual PortType inputPortType(port_t i) const
00095 {
00096 return undefined;
00097 }
00098
00099 protected:
00101 double Vm;
00103 double u;
00105 double dt_msec;
00106
00107
00109 static ThreadSpecificRandomDistribution< NormalDistribution > white_noise;
00110
00112
00113
00115 int noiseType;
00117 double Isyn;
00118
00119 protected:
00120 double factI;
00121 };
00122
00123
00124
00126
00134 class IzhiNeuron : public IzhiNeuronBase, public CurrentInputTarget
00135 {
00136 SIMOBJECT(IzhiNeuron, AdvancePhase::One)
00137
00138 public:
00139 IzhiNeuron(double a = 0.02,
00140 double b = 0.2,
00141 double c = -65.0,
00142 double d = 8.0,
00143 double Vpeak = 30.0,
00144 double Vinit = -0.06,
00145 double Inoise = 0.0,
00146 double Iinject = 0.0,
00147 double factI = 1.0);
00148
00149
00150 IzhiNeuron(string type,
00151 double Vinit =-0.06,
00152 double Inoise = 0.0,
00153 double Iinject = 0.0,
00154 double factI = 1.0);
00155
00156 virtual ~IzhiNeuron() {
00157
00158 }
00159
00160 virtual void currentInput(double Isyn);
00161 };
00162
00163
00164
00166
00174 class CbIzhiNeuron : public IzhiNeuronBase, public ConductanceInputTarget
00175 {
00176 SIMOBJECT(CbIzhiNeuron, AdvancePhase::One)
00177
00178 public:
00179 CbIzhiNeuron(double a = 0.02,
00180 double b = 0.2,
00181 double c =-65.0,
00182 double d = 8.0,
00183 double Vpeak = 30.0,
00184 double Vinit =-0.06,
00185 double Inoise = 0.0,
00186 double Iinject = 0.0,
00187 double factI = 1.0);
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 CbIzhiNeuron(string type,
00199 double Vinit =-0.06,
00200 double Inoise = 0.0,
00201 double Iinject = 0.0,
00202 double factI = 1.0);
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 virtual ~CbIzhiNeuron() {
00214
00215 }
00216
00217 virtual void currentInput(double Isyn);
00218 virtual void conductanceInput(double g, double Erev);
00219
00221 virtual double getVm()
00222 {
00223 return Vm;
00224 }
00225 };
00226
00227
00228
00230
00236 class ExIzhiNeuronBase : public IzhiNeuronBase
00237 {
00238 public:
00239 ExIzhiNeuronBase(double a = 0.02,
00240 double b = 0.2,
00241 double c = -65.0,
00242 double d = 8.0,
00243 double k = 0.7,
00244 double Vt = -60.0,
00245 double Vr = -45.0,
00246 double Cm = 100.0,
00247 double Vpeak = 30.0,
00248 double Vinit = -0.06,
00249 double Inoise = 0.0,
00250 double Iinject = 0.0,
00251 double factI = 1.0);
00252
00253 ExIzhiNeuronBase(string type,
00254 double Vinit = -0.06,
00255 double Inoise = 0.0,
00256 double Iinject = 0.0,
00257 double factI = 1.0);
00258
00259 virtual ~ExIzhiNeuronBase(){
00260
00261 }
00262
00264 virtual int advance(AdvanceInfo const &);
00265
00266 protected:
00268 double k;
00270 double Vr;
00272 double Vt;
00274 double Cm;
00275 };
00276
00277
00279
00285 class ExIzhiNeuron : public ExIzhiNeuronBase, public CurrentInputTarget
00286 {
00287 SIMOBJECT(ExIzhiNeuron, AdvancePhase::One)
00288
00289 public:
00290 ExIzhiNeuron(double a = 0.02,
00291 double b = 0.2,
00292 double c = -65.0,
00293 double d = 8.0,
00294 double k = 0.7,
00295 double Vt = -60.0,
00296 double Vr = -45.0,
00297 double Cm = 100.0,
00298 double Vpeak = 30.0,
00299 double Vinit = -0.06,
00300 double Inoise = 0.0,
00301 double Iinject = 0.0,
00302 double factI = 1.0);
00303
00304 ExIzhiNeuron(string type,
00305 double Vinit =-0.06,
00306 double Inoise = 0.0,
00307 double Iinject = 0.0,
00308 double factI = 1.0);
00309
00310 virtual ~ExIzhiNeuron() {
00311
00312 }
00313
00314 virtual void currentInput(double Isyn);
00315 };
00316
00317
00318
00320
00326 class CbExIzhiNeuron : public ExIzhiNeuronBase, public ConductanceInputTarget
00327 {
00328 SIMOBJECT(CbExIzhiNeuron, AdvancePhase::One)
00329
00330 public:
00331 CbExIzhiNeuron(double a = 0.02,
00332 double b = 0.2,
00333 double c =-65.0,
00334 double d = 8.0,
00335 double k = 0.7,
00336 double Vt = -60.0,
00337 double Vr = -45.0,
00338 double Cm = 100.0,
00339 double Vpeak = 30.0,
00340 double Vinit =-0.06,
00341 double Inoise = 0.0,
00342 double Iinject = 0.0,
00343 double factI = 1.0);
00344
00345 CbExIzhiNeuron(string type,
00346 double Vinit =-0.06,
00347 double Inoise = 0.0,
00348 double Iinject = 0.0,
00349 double factI = 1.0);
00350
00351 virtual ~CbExIzhiNeuron() {
00352
00353 }
00354
00355 virtual void currentInput(double Isyn);
00356 virtual void conductanceInput(double g, double Erev);
00357
00359 virtual double getVm()
00360 {
00361 return Vm;
00362 }
00363 };
00364
00365 #endif