23 #ifndef STDP_CONNECTION_FACETSHW_HOM_H
24 #define STDP_CONNECTION_FACETSHW_HOM_H
118 template<
typename target
identifierT>
175 template<
typename target
identifierT>
280 template<
typename target
identifierT>
285 return (a_thresh_tl + configbit[2] * a_causal + configbit[1] * a_acausal)
286 / (1 + configbit[2] + configbit[1])
287 > (a_thresh_th + configbit[0] * a_causal + configbit[3] * a_acausal)
288 / (1 + configbit[0] + configbit[3]);
291 template<
typename target
identifierT>
296 return round(weight / weight_per_lut_entry);
299 template<
typename target
identifierT>
304 return discrete_weight * weight_per_lut_entry;
307 template<
typename target
identifierT>
312 return table[discrete_weight_];
322 template<
typename target
identifierT>
340 if(init_flag_ ==
false){
345 std::cout <<
"init synapse " << synapse_id_ <<
" - first readout time: " << next_readout_time_ << std::endl;
350 if(t_spike > next_readout_time_)
356 bool eval_0 = eval_function_(a_causal_, a_acausal_, a_thresh_th_, a_thresh_tl_, cp.
configbit_0_);
357 bool eval_1 = eval_function_(a_causal_, a_acausal_, a_thresh_th_, a_thresh_tl_, cp.
configbit_1_);
360 if(eval_0 ==
true && eval_1 ==
false){
364 }
else if(eval_0 ==
false && eval_1 ==
true){
368 }
else if(eval_0 ==
true && eval_1 ==
true){
375 while(t_spike > next_readout_time_){
389 std::deque<histentry>::iterator
start;
390 std::deque<histentry>::iterator finish;
391 get_target(t)->get_history(t_lastspike - dendritic_delay, t_spike - dendritic_delay,
399 minus_dt = t_lastspike - (start->t_ + dendritic_delay);
405 plus_dt = (finish->t_ + dendritic_delay) - t_spike;
409 a_causal_ += std::exp(minus_dt / cp.
tau_plus_);
413 a_acausal_ += std::exp(plus_dt / cp.
tau_minus_);
425 #endif // of #ifndef STDP_CONNECTION_HOM_H
void get_status(DictionaryDatum &d) const
Get all properties and put them into a dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:125
double_t readout_cycle_duration_
Definition: stdp_connection_facetshw_hom.h:161
void set_rport(rport p)
Set the receiver port number (r-port).
Definition: event.h:817
double_t weight
Weight of a connection.
Definition: nest.h:170
void set_receiver(Node &)
Change pointer to receiving Node.
Definition: event.h:708
const Name receptor_type("receptor_type")
Connection parameters.
Definition: nest_names.h:240
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
double_t weight_per_lut_entry_
Definition: stdp_connection_facetshw_hom.h:155
long_t get_delay_steps() const
Return the delay of the connection in steps.
Definition: connection.h:126
void check_connection_(Node &dummy_target, Node &source, Node &target, rport receptor_type)
This function calls check_connection() on the sender to check if the receiver accepts the event type ...
Definition: connection.h:183
bool init_flag_
Definition: stdp_connection_facetshw_hom.h:274
const rport invalid_port_
Value for invalid connection port number.
Definition: nest.h:160
Class representing an STDP connection with homogeneous parameters, i.e.
Definition: stdp_connection_facetshw_hom.h:113
Encapsulates information which is sent between Nodes.
Definition: event.h:73
void set_weight(double_t w)
Definition: stdp_connection_facetshw_hom.h:256
Definition: nest_time.h:230
Connection< targetidentifierT > ConnectionBase
Definition: stdp_connection_facetshw_hom.h:182
bool eval_function_(double_t a_causal, double_t a_acausal, double_t a_thresh_th, double_t a_thresh_tl, std::vector< long_t > configbit)
Definition: stdp_connection_facetshw_hom.h:282
long_t synapses_per_driver_
Definition: stdp_connection_facetshw_hom.h:159
std::vector< long_t > lookuptable_1_
Definition: stdp_connection_facetshw_hom.h:163
void set_weight(weight t)
Set weight of the event.
Definition: event.h:751
long_t synapse_id_
Definition: stdp_connection_facetshw_hom.h:275
std::vector< long_t > configbit_1_
Definition: stdp_connection_facetshw_hom.h:166
std::vector< long_t > reset_pattern_
Definition: stdp_connection_facetshw_hom.h:167
long_t rport
Connection port number to distinguish incoming connections, also called receiver port.
Definition: nest.h:147
void set_status(const DictionaryDatum &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:297
double_t a_thresh_tl_
Definition: stdp_connection_facetshw_hom.h:272
long_t no_synapses_
Definition: stdp_connection_facetshw_hom.h:158
void get_status(DictionaryDatum &d) const
Get all properties of this connection and put them into a dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:277
Node * get_target(thread t) const
Definition: connection.h:155
double_t tau_minus_
Definition: stdp_connection_facetshw_hom.h:153
void set_status(const DictionaryDatum &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:148
double_t a_causal_
Definition: stdp_connection_facetshw_hom.h:269
uint_t discrete_weight_
Definition: stdp_connection_facetshw_hom.h:277
double_t get_delay() const
Return the delay of the connection in ms.
Definition: connection.h:121
double_t weight_
Definition: stdp_connection_facetshw_hom.h:268
const Name w("w")
Specific to Brette & Gerstner 2005 (aeif_cond-*)
Definition: nest_names.h:343
STDPFACETSHWHomCommonProperties< targetidentifierT > CommonPropertiesType
Definition: stdp_connection_facetshw_hom.h:181
Definition: nest_time.h:130
void send(Event &e, thread t, double_t t_lastspike, const STDPFACETSHWHomCommonProperties< targetidentifierT > &)
Send an event to the receiver of this connection.
Definition: stdp_connection_facetshw_hom.h:324
void set_delay(delay)
Set the transmission delay of the event.
Definition: event.h:781
double_t Wmax_
Definition: stdp_connection_facetshw_hom.h:154
double_t a_acausal_
Definition: stdp_connection_facetshw_hom.h:270
double_t driver_readout_time_
Definition: stdp_connection_facetshw_hom.h:160
Time const & get_stamp() const
Return time stamp of the event.
Definition: event.h:757
double_t next_readout_time_
Definition: stdp_connection_facetshw_hom.h:276
const Name start("start")
Device parameters.
Definition: nest_names.h:263
Base class for dummy nodes used in connection testing.
Definition: connection.h:64
Class containing the common properties for all synapses of type STDPFACETSHWConnectionHom.
Definition: stdp_connection_facetshw_hom.h:119
virtual void register_stdp_connection(double_t)
Register a STDP connection.
Definition: node.cpp:178
long_t port
Connection port number to distinguis outgoing connections.
Definition: nest.h:155
double_t tau_plus_
Definition: stdp_connection_facetshw_hom.h:152
double double_t
Double precision floating point numbers.
Definition: nest.h:93
std::vector< long_t > lookuptable_0_
Definition: stdp_connection_facetshw_hom.h:162
rport get_rport() const
Definition: connection.h:156
virtual port handles_test_event(SpikeEvent &, rport receptor_type)
Check if the node can handle a particular event and receptor type.
Definition: node.cpp:203
double_t get_ms() const
Definition: nest_time.h:389
void check_connection(Node &s, Node &t, rport receptor_type, double_t t_lastspike, const CommonPropertiesType &)
Definition: stdp_connection_facetshw_hom.h:247
uint_t lookup_(uint_t discrete_weight_, std::vector< long_t > table)
Definition: stdp_connection_facetshw_hom.h:309
unsigned int uint_t
Unsigned int_t.
Definition: nest.h:97
Class containing the common properties for all connections of a certain type.
Definition: common_synapse_properties.h:44
std::vector< long_t > lookuptable_2_
Definition: stdp_connection_facetshw_hom.h:164
Base class for representing connections.
Definition: connection.h:85
Event for spike information.
Definition: event.h:320
STDPFACETSHWHomCommonProperties()
Default constructor.
Definition: stdp_connection_facetshw_hom_impl.h:37
Base class for all NEST network objects.
Definition: node.h:96
STDPFACETSHWConnectionHom()
Default Constructor.
Definition: stdp_connection_facetshw_hom_impl.h:249
std::vector< long_t > configbit_0_
Definition: stdp_connection_facetshw_hom.h:165
double_t entry_to_weight_(uint_t discrete_weight, double_t weight_per_lut_entry)
Definition: stdp_connection_facetshw_hom.h:301
port handles_test_event(SpikeEvent &, rport)
Check if the node can handle a particular event and receptor type.
Definition: stdp_connection_facetshw_hom.h:229
Definition: connector_model.h:38
int_t thread
Thread index type.
Definition: nest.h:133
double_t a_thresh_th_
Definition: stdp_connection_facetshw_hom.h:271
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96
Definition: stdp_connection_facetshw_hom.h:223
const double e
Definition: numerics.cpp:62
void check_event(SpikeEvent &)
Definition: stdp_connection_facetshw_hom.h:142
void calc_readout_cycle_duration_()
Calculate the readout cycle duration.
Definition: stdp_connection_facetshw_hom_impl.h:118
const Name t_spike("t_spike")
Time of last spike.
Definition: nest_names.h:281
uint_t weight_to_entry_(double_t weight, double_t weight_per_lut_entry)
Definition: stdp_connection_facetshw_hom.h:293