00001 #ifndef GABA_BRESPONSE_H_ 00002 #define GABA_BRESPONSE_H_ 00003 00004 #include "PCSIMException.h" 00005 #include "FiniteSpikeResponse.h" 00006 00007 #include <iostream> 00008 using std::cerr; 00009 using std::endl; 00010 00011 class GABA_BResponse: public FiniteSpikeResponse 00012 { 00013 public: 00014 GABA_BResponse(); 00015 00016 virtual ~GABA_BResponse() { 00017 } 00018 00020 double k1; 00022 double k2; 00023 00025 double k3; 00027 double k4; 00028 00030 double kd; 00031 00033 int n; 00034 00036 double Cmax; 00037 00039 double Cdur; 00040 00042 double dead_time; 00043 00045 double r; 00046 00048 double s; 00049 00050 virtual int reset( double dt ); 00051 00052 virtual int advance(AdvanceInfo const &ai); 00053 00054 virtual int spikeHit( spikeport_t port, SpikeEvent const& spike ); 00055 00056 virtual int psrLength(double dt) const; 00057 00058 double time_count; 00059 00060 double g_max; 00061 00062 protected: 00063 double C1_on, C1_off, C2_on, C3, C4; 00064 }; 00065 00066 00067 00068 00070 // Nest style 00072 00073 class GABA_BResponseNest: public FiniteSpikeResponse 00074 { 00075 public: 00076 GABA_BResponseNest(); 00077 00078 virtual ~GABA_BResponseNest() 00079 { 00080 } 00081 00083 double k1; 00085 double k2; 00086 00088 double k3; 00090 double k4; 00091 00093 double kd; 00094 00096 double pulse; 00097 00099 double T; 00100 00102 int n; 00103 00105 double r; 00106 00108 double s; 00109 00110 virtual int reset(double dt); 00111 00112 virtual int advance(AdvanceInfo const &ai); 00113 00114 virtual int spikeHit(spikeport_t port, SpikeEvent const& spike); 00115 00116 virtual int psrLength(double dt) const; 00117 00118 double g_max; 00119 00120 protected: 00121 // The exact integration matrix 00122 double exp_A00; 00123 double exp_A10; 00124 double exp_A11; 00125 00126 // Values used to register a spike 00127 double exp_r_add; 00128 double r_inf; 00129 }; 00130 00131 00132 #endif /*GABA_BRESPONSE_H_*/