Skip to content

Commit

Permalink
Fixed missing noise variant of add_RK
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Sep 13, 2016
1 parent e0e9377 commit 314de67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 2 additions & 5 deletions Cortical_Column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ void Cortical_Column::add_RK(void) {
add_RK(s_ei);
add_RK(s_gp);
add_RK(s_gi);
add_RK(x_ep);
add_RK(x_ei);
add_RK_noise(x_ep, 0);
add_RK_noise(x_ei, 1);
add_RK(x_gp);
add_RK(x_gi);

Expand All @@ -172,6 +172,3 @@ void Cortical_Column::iterate_ODE(void) {
}
add_RK();
}
/******************************************************************************/
/* end */
/******************************************************************************/
7 changes: 5 additions & 2 deletions Cortical_Column.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Cortical_Column {
void set_input (double I) {input = I;}
void iterate_ODE (void);
private:
/* Initialize the RNGs */
void set_RNG (void);

/* Firing rates */
Expand Down Expand Up @@ -73,11 +72,15 @@ class Cortical_Column {
/* Helper functions */
inline std::vector<double> init (double value)
{return {value, 0.0, 0.0, 0.0, 0.0};}

inline void add_RK (std::vector<double>& var)
{var[0] = (-3*var[0] + 2*var[1] + 4*var[2] + 2*var[3] + var[4])/6;}

inline void add_RK_noise (std::vector<double>& var, unsigned noise)
{var[0] = (-3*var[0] + 2*var[1] + 4*var[2] + 2*var[3] + var[4])/6 + noise_aRK(noise);}

/* Random number generators */
std::vector<random_stream_normal> MTRands;
std::vector<random_stream_normal> MTRands;

/* Container for noise */
std::vector<double> Rand_vars;
Expand Down

0 comments on commit 314de67

Please sign in to comment.