1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
void Network::step(valarray<double> syn_in) {
int i;
double g_AMPA, g_NMDA, g_GABA, g_in=0;
double stats[6];
valarray<double> syn_AMPA(N_E), syn_NMDA(N_E), syn_GABA(N_I);
valarray<double> syns_AMPA, syns_NMDA, syns_GABA, syns_in;
valarray<double> w_Ei, w_Ii, w_ini(N_in);
slice iEslice, iIslice, iinslice;
i = int(stats[0]);
for (i=0; i<N_E; i++) { // gather local synaptic activations
allneurons[i].fillwstats(stats);
syn_AMPA[i] = stats[3];
syn_NMDA[i] = stats[4];
}
for (i=0; i<N_I; i++) {
allneurons[i+N_E].fillwstats(stats);
syn_GABA[i] = stats[5];
}
for (i=0; i<N; i++) { //step over all neurons
iEslice = slice(i*N_E, N_E, 1);
iIslice = slice(i*N_I, N_I, 1);
iinslice = slice(i*N_in, N_in, 1);
w_Ei = w_E[iEslice]; //initialize weights
w_ini = w_in[iinslice];
w_Ii = w_I[iIslice];
//other stuff
}
}
|