Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
they now compile diff --git a/c++/synapses/nadim/A2ASynapse.hpp b/c++/synapses/nadim/A2ASynapse.hpp index 93586f1..35449ef 100644 --- a/c++/synapses/nadim/A2ASynapse.hpp +++ b/c++/synapses/nadim/A2ASynapse.hpp @@ -7,6 +7,10 @@ class A2ASynapse: public synapse { public: + double Delta; + double Vth; + double k_; + // specify parameters + initial conditions A2ASynapse(double g_, double s_) { @@ -24,14 +28,14 @@ public: } - void integrate(double dt); + void integrate(void); void connect(compartment *pcomp1_, compartment *pcomp2_); int getFullState(double*, int); int getFullStateSize(void); }; -void A2ASynapse::integrate(double dt) { +void A2ASynapse::integrate() { // figure out the voltage of the pre-synaptic neuron double V_pre = pre_syn->V; @@ -40,11 +44,12 @@ void A2ASynapse::integrate(double dt) { double s_inf = 1.0/(1.0+exp((Vth - V_pre)/Delta)); // integrate using exponential Euler - double tau_s = 100.0/(1.0+exp((Vth - V_pre)/k_); + double tau_s = 100.0/(1.0+exp((Vth - V_pre)/k_)); s = s_inf + (s - s_inf)*exp(-dt/tau_s); + g = gmax*s; } diff --git a/c++/synapses/nadim/NeuriteSyn.hpp b/c++/synapses/nadim/NeuriteSyn.hpp index e570fcf..3fbd8c0 100644 --- a/c++/synapses/nadim/NeuriteSyn.hpp +++ b/c++/synapses/nadim/NeuriteSyn.hpp @@ -7,6 +7,10 @@ class NeuriteSyn: public synapse { public: + double Delta; + double Vth; + double k_; + // specify parameters + initial conditions NeuriteSyn(double g_, double s_) { @@ -24,15 +28,14 @@ public: } - void integrate(double dt); + void integrate(void); void connect(compartment *pcomp1_, compartment *pcomp2_); int getFullState(double*, int); int getFullStateSize(void); }; -void NeuriteSyn::integrate(double dt) -{ +void NeuriteSyn::integrate(void) { // figure out the voltage of the pre-synaptic neuron double V_pre = pre_syn->V; @@ -45,13 +48,12 @@ void NeuriteSyn::integrate(double dt) s = s_inf + (s - s_inf)*exp(-dt/tau_s); - + g = gmax*s; } -int NeuriteSyn::getFullState(double *syn_state, int idx) -{ +int NeuriteSyn::getFullState(double *syn_state, int idx) { // give it the current synapse variable syn_state[idx] = s; idx++; @@ -63,14 +65,12 @@ int NeuriteSyn::getFullState(double *syn_state, int idx) } -int NeuriteSyn::getFullStateSize() -{ +int NeuriteSyn::getFullStateSize() { return 2; } -void NeuriteSyn::connect(compartment *pcomp1_, compartment *pcomp2_) -{ +void NeuriteSyn::connect(compartment *pcomp1_, compartment *pcomp2_) { pre_syn = pcomp1_; post_syn = pcomp2_; diff --git a/c++/synapses/nadim/Soma.hpp b/c++/synapses/nadim/Soma.hpp index c4ff9ba..831f474 100644 --- a/c++/synapses/nadim/Soma.hpp +++ b/c++/synapses/nadim/Soma.hpp @@ -7,6 +7,10 @@ class Soma: public synapse { public: + double Delta; + double Vth; + double k_; + // specify parameters + initial conditions Soma(double g_, double s_) { @@ -24,15 +28,14 @@ public: } - void integrate(double dt); + void integrate(void); void connect(compartment *pcomp1_, compartment *pcomp2_); int getFullState(double*, int); int getFullStateSize(void); }; -void Soma::integrate(double dt) -{ +void Soma::integrate(void) { // figure out the voltage of the pre-synaptic neuron double V_pre = pre_syn->V; @@ -41,17 +44,16 @@ void Soma::integrate(double dt) double s_inf = 1.0/(1.0+exp((Vth - V_pre)/Delta)); // integrate using exponential Euler - double tau_s = 100.0/(1.0+exp((Vth - V_pre)/k_); + double tau_s = 100.0/(1.0+exp((Vth - V_pre)/k_)); s = s_inf + (s - s_inf)*exp(-dt/tau_s); - + g = gmax*s; } -int Soma::getFullState(double *syn_state, int idx) -{ +int Soma::getFullState(double *syn_state, int idx) { // give it the current synapse variable syn_state[idx] = s; idx++; @@ -63,14 +65,12 @@ int Soma::getFullState(double *syn_state, int idx) } -int Soma::getFullStateSize() -{ +int Soma::getFullStateSize() { return 2; } -void Soma::connect(compartment *pcomp1_, compartment *pcomp2_) -{ +void Soma::connect(compartment *pcomp1_, compartment *pcomp2_) { pre_syn = pcomp1_; post_syn = pcomp2_;
- Loading branch information