NEST main@caf0ae8
 
Loading...
Searching...
No Matches
clopath_archiving_node.h
Go to the documentation of this file.
1/*
2 * clopath_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 CLOPATH_ARCHIVING_NODE_H
24#define CLOPATH_ARCHIVING_NODE_H
25
26// C++ includes:
27#include <deque>
28
29// Includes from nestkernel:
30#include "archiving_node.h"
31#include "histentry.h"
32#include "nest_time.h"
33#include "nest_types.h"
34#include "synaptic_element.h"
35
36
37namespace nest
38{
39
45{
46
47public:
49
51
55 double get_LTD_value( double t ) override;
56
61 void get_LTP_history( double t1,
62 double t2,
63 std::deque< histentry_extended >::iterator* start,
64 std::deque< histentry_extended >::iterator* finish ) override;
65
69 double get_theta_plus() const;
70
74 double get_theta_minus() const;
75
76protected:
81 void write_LTD_history( const double t_ltd_ms, double u_bar_minus, double u_bar_bar );
82
87 void write_LTP_history( const double t_ltp_ms, double u, double u_bar_plus );
88
94 void write_clopath_history( Time const& t_sp, double u, double u_bar_plus, double u_bar_minus, double u_bar_bar );
95
106 void get_status( Dictionary& d ) const override;
107 void set_status( const Dictionary& d ) override;
108
109private:
110 std::vector< histentry_extended > ltd_history_;
111 std::deque< histentry_extended > ltp_history_;
112
113 double A_LTD_;
114
115 double A_LTP_;
116
118
120
122
124
127 std::vector< double > delayed_u_bar_plus_;
128 std::vector< double > delayed_u_bar_minus_;
130
132
134};
135
136inline double
141
142inline double
147
148} // of namespace
149#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
An archiving node which additionally archives parameters and buffers needed for the Clopath plasticit...
Definition clopath_archiving_node.h:45
std::vector< double > delayed_u_bar_minus_
Definition clopath_archiving_node.h:128
double theta_plus_
Definition clopath_archiving_node.h:119
double delay_u_bars_
Definition clopath_archiving_node.h:125
std::vector< double > delayed_u_bar_plus_
Definition clopath_archiving_node.h:127
double u_ref_squared_
Definition clopath_archiving_node.h:117
size_t ltd_hist_current_
Definition clopath_archiving_node.h:133
double get_theta_plus() const
Returns threshold theta_plus_.
Definition clopath_archiving_node.h:137
std::vector< histentry_extended > ltd_history_
Definition clopath_archiving_node.h:110
bool A_LTD_const_
Definition clopath_archiving_node.h:123
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition clopath_archiving_node.cpp:77
ClopathArchivingNode()
Definition clopath_archiving_node.cpp:34
size_t delayed_u_bars_idx_
Definition clopath_archiving_node.h:129
double get_LTD_value(double t) override
Returns value in LTD history at time t.
Definition clopath_archiving_node.cpp:126
double theta_minus_
Definition clopath_archiving_node.h:121
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition clopath_archiving_node.cpp:91
double A_LTP_
Definition clopath_archiving_node.h:115
double A_LTD_
Definition clopath_archiving_node.h:113
void init_clopath_buffers()
Initialization of buffers.
Definition clopath_archiving_node.cpp:63
void write_clopath_history(Time const &t_sp, double u, double u_bar_plus, double u_bar_minus, double u_bar_bar)
Writes and reads the delayed_u_bar_[plus/minus] buffers and calls write_LTD_history and write_LTP_his...
Definition clopath_archiving_node.cpp:184
size_t ltd_hist_len_
Definition clopath_archiving_node.h:131
void get_LTP_history(double t1, double t2, std::deque< histentry_extended >::iterator *start, std::deque< histentry_extended >::iterator *finish) override
Sets pointer start (finish) to the first (last) entry in LTP_history whose time argument is between t...
Definition clopath_archiving_node.cpp:151
void write_LTP_history(const double t_ltp_ms, double u, double u_bar_plus)
Creates a new entry in the LTP history and delets old entries that are not needed any more.
Definition clopath_archiving_node.cpp:229
void write_LTD_history(const double t_ltd_ms, double u_bar_minus, double u_bar_bar)
Creates a new entry in the LTD history and deletes old entries that are not needed any more.
Definition clopath_archiving_node.cpp:217
size_t delay_u_bars_steps_
Definition clopath_archiving_node.h:126
double get_theta_minus() const
Returns threshold theta_minus_.
Definition clopath_archiving_node.h:143
std::deque< histentry_extended > ltp_history_
Definition clopath_archiving_node.h:111
Definition nest_time.h:135
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33