NEST main@f146f75
Loading...
Searching...
No Matches
axonal_delay_archiving_node.h
Go to the documentation of this file.
1/*
2 * axonal_delay_archiving_node.h
3 *
4 * This file is part of NEST.
5 *
6 * Copyright (C) 2004 The NEST Initiative
7 *
8 * NEST is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * NEST is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef AXONAL_DELAY_ARCHIVING_NODE_H
24#define AXONAL_DELAY_ARCHIVING_NODE_H
25
26// C++ includes:
27#include <vector>
28
29// Includes from nestkernel:
30#include "nest_time.h"
31#include "nest_types.h"
32#include "static_assert.h"
34
35namespace nest
36{
37
46{
47public:
48 CorrectionEntrySTDPAxDelay( const size_t lcid,
49 const synindex syn_id,
50 const double t_last_pre_spike,
51 const double weight_revert,
52 const double new_weight,
53 const double K_plus_revert,
54 const long next_offset = -1 )
55 : lcid_( lcid )
56 , syn_id_( syn_id )
57 , t_last_pre_spike_( t_last_pre_spike )
58 , weight_revert_( weight_revert )
59 , new_weight_( new_weight )
60 , K_plus_revert_( K_plus_revert )
61 , next_offset_( next_offset )
62 {
63 }
64
66 size_t
67 get_lcid() const
68 {
69 return lcid_;
70 }
71
74 get_syn_id() const
75 {
76 return syn_id_;
77 }
78
80 double
82 {
83 return t_last_pre_spike_;
84 }
85
87 double
89 {
90 return weight_revert_;
91 }
92
93 void
94 set_weight_revert( const double weight_revert )
95 {
96 weight_revert_ = weight_revert;
97 }
98
100 double
102 {
103 return new_weight_;
104 }
105
106 void
107 set_new_weight( const double new_weight )
108 {
109 new_weight_ = new_weight;
110 }
111
113 double
115 {
116 return K_plus_revert_;
117 }
118
123 bool
124 has_next() const
125 {
126 return next_offset_ != -1;
127 }
128
133 long
135 {
136 return next_offset_;
137 }
138
139 void
140 set_next_offset( const long next_offset )
141 {
142 next_offset_ = next_offset;
143 }
144
145private:
146 unsigned int lcid_;
147 unsigned int syn_id_;
150 double new_weight_;
153};
154
157
181{
182public:
184
186
194 void register_axonal_delay_connection( const double dendritic_delay, const double axonal_delay );
195
210 const double t_last_pre_spike,
211 const double weight_revert,
212 const double new_weight,
213 const double K_plus_revert,
214 const double time_while_critical );
215
220 void update_weight_revert( const size_t lcid, const double weight_revert );
221
222protected:
225 void pre_run_hook_();
226
229
237 size_t correct_synapses_stdp_ax_delay_( const Time& t_spike );
238
239private:
243 std::vector< std::vector< CorrectionEntrySTDPAxDelay > > correction_entries_stdp_ax_delay_;
244
247};
248
249} // of namespace
250
251#endif
size_t correct_synapses_stdp_ax_delay_(const Time &t_spike)
Triggered when this neuron spikes, to correct all relevant incoming STDP synapses with predominantly ...
Definition axonal_delay_archiving_node.cpp:165
void update_weight_revert(const size_t lcid, const double weight_revert)
In case a correction is applied for a pre-synaptic spike, any other pre-synaptic spikes from the same...
Definition axonal_delay_archiving_node.cpp:150
void clear_expired_correction_entries_stdp_ax_delay_(const size_t lag)
Retire the correction entries which are no longer critical in the given time slot.
Definition axonal_delay_archiving_node.cpp:113
AxonalDelayArchivingNode()
Definition axonal_delay_archiving_node.cpp:31
std::vector< std::vector< CorrectionEntrySTDPAxDelay > > correction_entries_stdp_ax_delay_
Buffer of correction entries sorted by t_spike_pre + delay (i.e., the actual arrival time at this neu...
Definition axonal_delay_archiving_node.h:243
void register_axonal_delay_connection(const double dendritic_delay, const double axonal_delay)
Register a new incoming STDP connection, so this node knows whether it has to maintain correction ent...
Definition axonal_delay_archiving_node.cpp:58
void add_correction_entry_stdp_ax_delay(SpikeEvent &spike_event, const double t_last_pre_spike, const double weight_revert, const double new_weight, const double K_plus_revert, const double time_while_critical)
Buffer a correction entry for the critical time window.
Definition axonal_delay_archiving_node.cpp:67
void pre_run_hook_()
Definition axonal_delay_archiving_node.cpp:44
bool has_predominant_stdp_ax_delay_
false by default and set to true if any incoming connection has predominant axonal delays
Definition axonal_delay_archiving_node.h:246
Information on a received pre-synaptic spike which is buffered by an AxonalDelayArchivingNode,...
Definition axonal_delay_archiving_node.h:46
double new_weight_
new weight after the latest correction
Definition axonal_delay_archiving_node.h:150
double get_new_weight() const
Weight of the synapse after the latest correction.
Definition axonal_delay_archiving_node.h:101
bool has_next() const
Whether another spike of the same connection has been buffered after this one.
Definition axonal_delay_archiving_node.h:124
double get_K_plus_revert() const
Pre-synaptic trace before the possibly incorrect facilitation.
Definition axonal_delay_archiving_node.h:114
double t_last_pre_spike_
time of the last pre-synaptic spike before this spike
Definition axonal_delay_archiving_node.h:148
unsigned int syn_id_
synapse-type index
Definition axonal_delay_archiving_node.h:147
size_t get_lcid() const
Local connection index of the synapse which transmitted the spike.
Definition axonal_delay_archiving_node.h:67
void set_new_weight(const double new_weight)
Definition axonal_delay_archiving_node.h:107
void set_weight_revert(const double weight_revert)
Definition axonal_delay_archiving_node.h:94
double weight_revert_
synaptic weight to revert to (STDP depression needs to be undone)
Definition axonal_delay_archiving_node.h:149
double get_weight_revert() const
Synaptic weight to revert to (STDP depression needs to be undone) before a correction.
Definition axonal_delay_archiving_node.h:88
void set_next_offset(const long next_offset)
Definition axonal_delay_archiving_node.h:140
long next_offset_
steps to the next spike on this connection (-1 if none)
Definition axonal_delay_archiving_node.h:152
CorrectionEntrySTDPAxDelay(const size_t lcid, const synindex syn_id, const double t_last_pre_spike, const double weight_revert, const double new_weight, const double K_plus_revert, const long next_offset=-1)
Definition axonal_delay_archiving_node.h:48
synindex get_syn_id() const
Synapse type of the synapse which transmitted the spike.
Definition axonal_delay_archiving_node.h:74
long get_next_offset() const
Steps from the slot of this entry to the slot of the next spike on this connection.
Definition axonal_delay_archiving_node.h:134
unsigned int lcid_
local connection index
Definition axonal_delay_archiving_node.h:146
double K_plus_revert_
pre-synaptic trace before possibly incorrect facilitation
Definition axonal_delay_archiving_node.h:151
double get_t_last_pre_spike() const
Time of the last pre-synaptic spike before this spike.
Definition axonal_delay_archiving_node.h:81
Event for spike information.
Definition event.h:420
StructuralPlasticityNode()
Definition structural_plasticity_node.cpp:32
Definition nest_time.h:135
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
StaticAssert< sizeof(CorrectionEntrySTDPAxDelay)==48 >::success success_correction_entry_size
check for correct correction entry size
Definition axonal_delay_archiving_node.h:156
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:121
Compile time assertions.
Definition static_assert.h:47