23 #ifndef BINARY_NEURON_IMPL_H
24 #define BINARY_NEURON_IMPL_H
42 template<
typename TGainfunction>
49 template<
class TGainfunction>
56 template<
class TGainfunction>
61 t_next_(
Time::neg_inf()),
62 t_last_in_spike_(
Time::neg_inf())
69 template<
class TGainfunction>
75 template<
class TGainfunction>
81 throw BadProperty(
"All time constants must be strictly positive.");
84 template<
class TGainfunction>
91 template<
class TGainfunction>
95 template<
class TGainfunction>
100 template<
class TGainfunction>
110 template<
class TGainfunction>
118 template<
class TGainfunction>
131 template<
class TGainfunction>
138 template<
class TGainfunction>
142 B_.currents_.clear();
147 template<
class TGainfunction>
151 V_.rng_ = net_->get_rng(get_thread());
155 if ( S_.t_next_.is_neg_inf() )
156 S_.t_next_ =
Time::ms ( V_.exp_dev_(V_.rng_) * P_.tau_m_ );
164 template<
class TGainfunction>
171 for (
long_t lag = from ; lag < to ; ++lag )
176 S_.h_ += B_.spikes_.get_value(lag);
178 double_t c = B_.currents_.get_value(lag);
187 bool new_y = gain_(V_.rng_, S_.h_ + c);
189 if ( new_y != S_.y_ )
195 network()->send(*
this, se, lag);
200 S_.t_next_ +=
Time::ms ( V_.exp_dev_(V_.rng_) * P_.tau_m_ );
205 B_.logger_.record_data(origin.
get_steps() + lag);
211 template<
class TGainfunction>
230 if (gid == S_.last_in_gid_ && t_spike == S_.t_last_in_spike_)
253 S_.last_in_gid_ = gid;
257 template<
class TGainfunction>
274 template<
class TGainfunction>
277 B_.logger_.handle(e);
Binary stochastic neuron with linear or sigmoidal gain function.
Definition: binary_neuron.h:48
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
State_()
Default initialization.
Definition: binary_neuron_impl.h:57
State_ S_
Definition: binary_neuron.h:171
Definition: nest_time.h:230
delay get_steps() const
Definition: nest_time.h:395
void handle(SpikeEvent &)
Handle incoming spike events.
Definition: binary_neuron_impl.h:212
Event for electrical currents.
Definition: event.h:420
static delay get_min_delay()
Return minimal connection delay.
Definition: scheduler.h:805
void clear_history()
clear spike history
Definition: archiving_node.cpp:206
Parameters_ P_
Definition: binary_neuron.h:170
const Name h("h")
Summed input to a neuron (Ginzburg neuron)
Definition: nest_names.h:158
Definition: nest_time.h:235
const Name w("w")
Specific to Brette & Gerstner 2005 (aeif_cond-*)
Definition: nest_names.h:343
index get_sender_gid() const
Return GID of sending Node.
Definition: event.h:738
int_t get_multiplicity() const
Definition: event.h:352
Definition: nest_time.h:130
const Name tau_m("tau_m")
Membrane time constant.
Definition: nest_names.h:292
long_t get_rel_delivery_steps(const Time &t) const
Relative spike delivery time in steps.
Definition: event.h:775
const Name S("S")
Binary state (output) of neuron (Ginzburg neuron)
Definition: nest_names.h:255
Time const & get_stamp() const
Return time stamp of the event.
Definition: event.h:757
Declarations for class Network.
void set_multiplicity(int_t)
Definition: event.h:346
Independent parameters of the model.
Definition: binary_neuron.h:97
weight get_weight() const
Return the weight.
Definition: event.h:745
const Name origin("origin")
Device parameters.
Definition: nest_names.h:215
void init_state_(const Node &proto)
Private function to initialize the state of a node to model defaults.
Definition: binary_neuron_impl.h:132
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition: exceptions.h:420
a node which archives spike history for the purposes of timing dependent plasticity ...
Definition: archiving_node.h:50
double double_t
Double precision floating point numbers.
Definition: nest.h:93
Request data to be logged/logged data to be sent.
Definition: event.h:486
friend struct ms
Definition: nest_time.h:173
Buffers_(binary_neuron &)
Definition: binary_neuron_impl.h:96
static RecordablesMap< binary_neuron< TGainfunction > > recordablesMap_
Mapping of recordables names to access functions.
Definition: binary_neuron.h:177
Buffers of the model.
Definition: binary_neuron.h:130
const Name n("n")
Number of synaptic release sites (int >=0) (Tsodyks2_connection)
Definition: nest_names.h:202
binary_neuron()
Definition: binary_neuron_impl.h:111
long_t delay
Delay of a connection.
Definition: nest.h:178
Event for spike information.
Definition: event.h:320
void init_buffers_()
Private function to initialize the buffers of a node.
Definition: binary_neuron_impl.h:139
Base class for all NEST network objects.
Definition: node.h:96
void get(DictionaryDatum &, const Parameters_ &) const
Definition: binary_neuron_impl.h:85
void set(const DictionaryDatum &, const Parameters_ &)
Definition: binary_neuron_impl.h:92
const Name c("c")
Specific to Izhikevich 2003.
Definition: nest_names.h:62
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96
Parameters_()
Sets default parameter values.
Definition: binary_neuron_impl.h:50
const double e
Definition: numerics.cpp:62
void set(const DictionaryDatum &)
Set values from dicitonary.
Definition: binary_neuron_impl.h:76
void update(Time const &, const long_t, const long_t)
Bring the node from state $t$ to $t+n*dt$.
Definition: binary_neuron_impl.h:165
void get(DictionaryDatum &) const
Store current values in dictionary.
Definition: binary_neuron_impl.h:70
void calibrate()
Re-calculate dependent parameters of the node.
Definition: binary_neuron_impl.h:148
double_t get_current() const
Definition: event.h:444
Buffers_ B_
Definition: binary_neuron.h:173
const Name t_spike("t_spike")
Time of last spike.
Definition: nest_names.h:281
delay get_delay() const
Return transmission delay of the event.
Definition: event.h:769