void pif_psc_delta_canon_cvv::handle(SpikeEvent & e) { assert(e.get_delay() > 0); /* We need to compute the absolute time stamp of the delivery time of the spike, since spikes might spend longer than min_delay_ in the queue. The time is computed according to Time Memo, Rule 3. */ const long_t Tdeliver = e.get_stamp().get_steps() + e.get_delay() - 1; B_.events_.add_spike(e.get_rel_delivery_steps(network()->get_slice_origin()), Tdeliver, e.get_offset(), e.get_weight() * e.get_multiplicity()); }
// function handles exact spike times void nest::iaf_psc_alpha_presc::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); const long_t Tdeliver = e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ); const double_t spike_weight = V_.PSCInitialValue_ * e.get_weight() * e.get_multiplicity(); const double_t dt = e.get_offset(); // Building the new matrix for the offset of the spike // NOTE: We do not use get matrix, but compute only those // components we actually need for spike registration // needed in any case const double_t ps_e_TauSyn = numerics::expm1( -dt / P_.tau_syn_ ); const double_t ps_e_Tau = numerics::expm1( -dt / P_.tau_m_ ); const double_t ps_P31 = V_.gamma_sq_ * ps_e_Tau - V_.gamma_sq_ * ps_e_TauSyn - dt * V_.gamma_ * ps_e_TauSyn - dt * V_.gamma_; B_.spike_y1_.add_value( Tdeliver, spike_weight * ps_e_TauSyn + spike_weight ); B_.spike_y2_.add_value( Tdeliver, spike_weight * dt * ps_e_TauSyn + spike_weight * dt ); B_.spike_y3_.add_value( Tdeliver, spike_weight * ps_P31 ); }
void nest::iaf_psc_alpha_mod::handle(SpikeEvent & e) { assert(e.get_delay() > 0); // port 0: spikes are normally handled. if(e.get_rport() == 0 ){ if(e.get_weight() > 0.0) B_.ex_spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); else B_.in_spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); } // port 1: spikes act as modulators for all spikes that arrive at.... if(e.get_rport() == 1 ){ B_.modspikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); } // ....port 2. These weights get modulated. if(e.get_rport() == 2 ){ if(e.get_weight() > 0.0){ double tmpweight = e.get_weight() * (1.0 + S_.ymod_) ; tmpweight = (tmpweight > P_.max_weight_ ? P_.max_weight_ : tmpweight); B_.ex_spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), tmpweight * e.get_multiplicity() ); } else B_.in_spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); } }
void nest::izhikevich::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); B_.spikes_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::izhikevich::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); B_.spikes_.add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::iaf_neuron_dif_alpha::handle(SpikeEvent & e) { assert(e.get_delay() > 0); B_.spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); //std::cout<<"spike handle "<<e.get_stamp().get_ms()<<"\n"; }
void nest::iaf_chs_2007::handle(SpikeEvent &e) { assert ( e.get_delay() > 0 ); if ( e.get_weight() >= 0.0 ) B_.spikes_ex_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); }
void iaf_psc_exp_multisynapse::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); B_.spikes_[ e.get_rport() - 1 ].add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void mynest::coronet_neuron::handle(SpikeEvent & e) { assert(e.get_delay() > 0); assert(e.get_rport() < static_cast<int_t>(B_.spike_inputs_.size())); B_.spike_inputs_[e.get_rport()]. add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); }
void nest::ht_neuron::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); assert( e.get_rport() < static_cast< int_t >( B_.spike_inputs_.size() ) ); B_.spike_inputs_[ e.get_rport() ].add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::iaf_cond_alpha_mc::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); assert( 0 <= e.get_rport() && e.get_rport() < 2 * NCOMP ); B_.spikes_[ e.get_rport() ].add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::aeif_cond_exp::handle(SpikeEvent &e) { assert ( e.get_delay() > 0 ); if(e.get_weight() > 0.0) B_.spike_exc_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity()); else B_.spike_inh_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), -e.get_weight() * e.get_multiplicity()); // keep conductances positive }
void nest::iaf_cond_delta::handle(SpikeEvent & e) { assert(e.get_delay() > 0); if(e.get_weight() > 0.0) B_.spikes_ex_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); else B_.spikes_in_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), -e.get_weight() * e.get_multiplicity() ); // note: conductance is positive for both exc and inh synapses but we use the sign of spike event weight to distinguish which kind of synapse it is }
void nest::hh_psc_alpha::handle(SpikeEvent & e) { assert(e.get_delay() > 0); if(e.get_weight() > 0.0) B_.spike_exc_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); else B_.spike_inh_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity() ); // current input, keep negative weight }
void nest::iaf_psc_delta::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); // EX: We must compute the arrival time of the incoming spike // explicity, since it depends on delay and offset within // the update cycle. The way it is done here works, but // is clumsy and should be improved. B_.spikes_.add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
// function handles exact spike times void parrot_neuron_ps::handle( SpikeEvent& e ) { // Repeat only spikes incoming on port 0, port 1 will be ignored if ( 0 == e.get_rport() ) { assert( e.get_delay() > 0 ); // We need to compute the absolute time stamp of the delivery time // of the spike, since spikes might spend longer than min_delay_ // in the queue. The time is computed according to Time Memo, Rule 3. const long_t Tdeliver = e.get_stamp().get_steps() + e.get_delay() - 1; // parrot ignores weight of incoming connection, store multiplicity B_.events_.add_spike( e.get_rel_delivery_steps( nest::kernel().simulation_manager.get_slice_origin() ), Tdeliver, e.get_offset(), static_cast< double_t >( e.get_multiplicity() ) ); } }
void nest::sli_neuron::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); if ( e.get_weight() > 0.0 ) B_.ex_spikes_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); else B_.in_spikes_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::iaf_tum_2000::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); if ( e.get_weight() >= 0.0 ) B_.spikes_ex_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); else B_.spikes_in_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); }
void nest::iaf_cond_exp_sfa_rr::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); if ( e.get_weight() > 0.0 ) B_.spike_exc_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); else B_.spike_inh_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), -e.get_weight() * e.get_multiplicity() ); // ensure conductance is positive }
void iaf_psc_alpha_multisynapse::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); for ( size_t i = 0; i < P_.num_of_receptors_; ++i ) { if ( P_.receptor_types_[ i ] == e.get_rport() ) { B_.spikes_[ i ].add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); } } }
void iaf_psc_alpha::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); const double s = e.get_weight() * e.get_multiplicity(); if ( e.get_weight() > 0.0 ) B_.ex_spikes_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), s ); else B_.in_spikes_.add_value( e.get_rel_delivery_steps( kernel().simulation_manager.get_slice_origin() ), s ); }
void nest::hh_cond_exp_traub::handle(SpikeEvent & e) { assert(e.get_delay() > 0); if(e.get_weight() > 0.0) { B_.spike_exc_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight() * e.get_multiplicity()); } else { // add with negative weight, ie positive value, since we are changing a // conductance B_.spike_inh_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), -e.get_weight() * e.get_multiplicity()); } }
void ginzburg::handle(SpikeEvent & e) { assert(e.get_delay() > 0); // The following logic implements the encoding: // A single spike signals a transition to 0 state, two spikes in same time step // signal the transition to 1 state. // // Remember the global id of the sender of the last spike being received // this assumes that several spikes being sent by the same neuron in the same time step // are received consecutively or are conveyed by setting the multiplicity accordingly. long_t m = e.get_multiplicity(); long_t gid = e.get_sender_gid(); const Time &t_spike = e.get_stamp(); if (m == 1) { //multiplicity == 1, either a single 1->0 event or the first or second of a pair of 0->1 events if (gid == S_.last_in_gid_ && t_spike == S_.t_last_in_spike_) { // received twice the same gid, so transition 0->1 // take double weight to compensate for subtracting first event B_.spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), 2.0*e.get_weight()); } else { // count this event negatively, assuming it comes as single event // transition 1->0 B_.spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), -e.get_weight()); } } else // multiplicity != 1 if (m == 2) { // count this event positively, transition 0->1 B_.spikes_.add_value(e.get_rel_delivery_steps(network()->get_slice_origin()), e.get_weight()); } S_.last_in_gid_ = gid; S_.t_last_in_spike_ = t_spike; }
void aeif_cond_alpha_multisynapse::handle( SpikeEvent& e ) { assert( e.get_delay() > 0 ); assert( ( e.get_rport() > 0 ) && ( ( size_t ) e.get_rport() <= P_.num_of_receptors_ ) ); if ( e.get_weight() > 0.0 ) { B_.spike_exc_[ e.get_rport() - 1 ].add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), e.get_weight() * e.get_multiplicity() ); } else { B_.spike_inh_[ e.get_rport() - 1 ].add_value( e.get_rel_delivery_steps( network()->get_slice_origin() ), -e.get_weight() * e.get_multiplicity() ); // keep conductances positive } }