NEST main@caf0ae8
 
Loading...
Searching...
No Matches
archiving_node.h
Go to the documentation of this file.
1/*
2 * 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 ARCHIVING_NODE_H
24#define ARCHIVING_NODE_H
25
26// C++ includes:
27#include <algorithm>
28#include <deque>
29
30// Includes from nestkernel:
31#include "histentry.h"
33#include "nest_time.h"
34#include "nest_types.h"
35#include "node.h"
37
38
39#define DEBUG_ARCHIVER 1
40
41namespace nest
42{
43
49{
50public:
52
54
61 double get_K_value( double t ) override;
62
73 void get_K_values( double t, double& Kminus, double& nearest_neighbor_Kminus, double& Kminus_triplet ) override;
74
78 double get_K_triplet_value( const std::deque< histentry >::iterator& iter );
79
83 void get_history( double t1,
84 double t2,
85 std::deque< histentry >::iterator* start,
86 std::deque< histentry >::iterator* finish ) override;
87
94 void register_stdp_connection( double t_first_read, double delay ) override;
95
96 void get_status( Dictionary& d ) const override;
97 void set_status( const Dictionary& d ) override;
98
99protected:
103 void set_spiketime( Time const& t_sp, double offset = 0.0 );
104
108 inline double get_spiketime_ms() const;
109
113 void clear_history();
114
122
123private:
124 // sum exp(-(t-ti)/tau_minus)
125 double Kminus_;
126
127 // sum exp(-(t-ti)/tau_minus_triplet)
129
132
133 // time constant for triplet low pass filtering of "post" spike train
136
138 double trace_;
139
141
142 // spiking history needed by stdp synapses
143 std::deque< histentry > history_;
144};
145
146inline double
148{
149 return last_spike_;
150}
151
152} // of namespace
153#endif
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
A node which archives spike history for the purposes of spike-timing dependent plasticity (STDP)
Definition archiving_node.h:49
double get_K_triplet_value(const std::deque< histentry >::iterator &iter)
Return the triplet Kminus value for the associated iterator.
double tau_minus_inv_
Definition archiving_node.h:131
void register_stdp_connection(double t_first_read, double delay) override
Register a new incoming STDP connection.
Definition archiving_node.cpp:67
void get_history(double t1, double t2, std::deque< histentry >::iterator *start, std::deque< histentry >::iterator *finish) override
Return the spike times (in steps) of spikes which occurred in the range [t1,t2].
Definition archiving_node.cpp:151
std::deque< histentry > history_
Definition archiving_node.h:143
double tau_minus_
Definition archiving_node.h:130
void clear_history()
Clear spike history.
Definition archiving_node.cpp:269
double last_spike_
Definition archiving_node.h:140
ArchivingNode()
Definition archiving_node.cpp:34
double max_delay_
Definition archiving_node.h:137
double trace_
Definition archiving_node.h:138
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition archiving_node.cpp:220
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition archiving_node.cpp:236
void get_K_values(double t, double &Kminus, double &nearest_neighbor_Kminus, double &Kminus_triplet) override
Write the different STDP K values at time t (in ms) to the provided locations.
Definition archiving_node.cpp:116
double tau_minus_triplet_
Definition archiving_node.h:134
double get_K_value(double t) override
Return the Kminus (synaptic trace) value at time t (given in ms).
Definition archiving_node.cpp:87
double Kminus_
Definition archiving_node.h:125
size_t n_incoming_
Number of incoming connections from STDP connectors.
Definition archiving_node.h:121
double Kminus_triplet_
Definition archiving_node.h:128
double tau_minus_triplet_inv_
Definition archiving_node.h:135
void set_spiketime(Time const &t_sp, double offset=0.0)
Record spike history.
Definition archiving_node.cpp:179
double get_spiketime_ms() const
Return most recent spike time in ms.
Definition archiving_node.h:147
Class implementing an ignore-and-fire mechanism for neuron models.
Definition ignore_and_spike_mechanism.h:40
Implements functionality related to structural synaptic plasticity.
Definition structural_plasticity_node.h:44
Definition nest_time.h:135
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
Declarations for base class Node.