NEST main@caf0ae8
 
Loading...
Searching...
No Matches
synaptic_element.h
Go to the documentation of this file.
1/*
2 * synaptic_element.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 SYNAPTIC_ELEMENT_H
24#define SYNAPTIC_ELEMENT_H
25
66// C++ includes:
67#include <cmath>
68
69// Includes from nestkernel:
70#include "growth_curve.h"
71
72// Includes from libnestutil:
73#include "dictionary.h"
74
75
76namespace nest
77{
78
91{
92
93public:
95
97
102
104 {
105 delete growth_curve_;
106 }
107
113 void get( Dictionary& d ) const;
114
120 void set( const Dictionary& d );
121
122
132 void update( double t, double t_minus, double Ca_minus, double tau_Ca );
133
142 int
144 {
145 return std::floor( z_ ) - z_connected_;
146 }
150 int
152 {
153 return z_connected_;
154 }
158 double
160 {
161 return tau_vacant_;
162 }
168 void
169 connect( int n )
170 {
171 z_connected_ += n;
172 if ( z_connected_ > floor( z_ ) )
173 {
174 z_ = z_connected_ + ( z_ - floor( z_ ) );
175 }
176 }
177
181 void
183 {
184 if ( growth_curve_ != &g )
185 {
186 delete growth_curve_;
187 growth_curve_ = &g;
188 }
189 }
190
194 double
196 {
197 return growth_rate_;
198 }
199
200 void
201 set_z( const double z_new )
202 {
203 z_ = z_new;
204 }
205 double
206 get_z() const
207 {
208 return z_;
209 }
214 void
216 {
217 if ( get_z_vacant() > 0 )
218 {
220 }
221 }
222
223 bool
225 {
226 return continuous_;
227 }
228
229private:
230 // The current number of synaptic elements at t = z_t_
231 double z_;
232 // Last time stamp when the number of synaptic elements was updated
233 double z_t_;
234 // Number of synaptic elements bound to a synapse
236 // Variable which defines if the number of synaptic elements should be treated
237 // as a continous double number or as an integer value
239 // The maximum amount by which the synaptic elements will change between time
240 // steps.
242 // Rate at which vacant synaptic elements will decay
244 // Growth curve which defines the dynamics of this synaptic element.
246};
247
248} // of namespace
249
250#endif /* #ifndef SYNAPTIC_ELEMENT_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Defines the way the number of synaptic elements changes through time according to the calcium concent...
Definition growth_curve.h:50
Synaptic element of a node (axonal bouton or dendritic spine) for the purposes of structural plastici...
Definition synaptic_element.h:91
double growth_rate_
Definition synaptic_element.h:241
SynapticElement()
Definition synaptic_element.cpp:37
void connect(int n)
Changes the number of bound synaptic elements by n.
Definition synaptic_element.h:169
bool continuous() const
Definition synaptic_element.h:224
double z_
Definition synaptic_element.h:231
void set_z(const double z_new)
Definition synaptic_element.h:201
GrowthCurve * growth_curve_
Definition synaptic_element.h:245
void update(double t, double t_minus, double Ca_minus, double tau_Ca)
Updates the number of available synaptic elements according to the mean calcium concentration of the ...
Definition synaptic_element.cpp:141
double z_t_
Definition synaptic_element.h:233
int get_z_connected() const
Retrieves the current number of synaptic elements bound to a synapse.
Definition synaptic_element.h:151
void decay_z_vacant()
Reduce the amount of vacant synaptic elements by a factor of tau_vacant_.
Definition synaptic_element.h:215
int z_connected_
Definition synaptic_element.h:235
double get_tau_vacant() const
Retrieves the value of tau_vacant.
Definition synaptic_element.h:159
int get_z_vacant() const
Get the number of synaptic_element at the time t (in ms)
Definition synaptic_element.h:143
bool continuous_
Definition synaptic_element.h:238
double get_z() const
Definition synaptic_element.h:206
void get(Dictionary &d) const
Store current values in a dictionary.
Definition synaptic_element.cpp:92
SynapticElement & operator=(const SynapticElement &other)
Definition synaptic_element.cpp:64
double get_growth_rate() const
Retrieves the current value of the growth rate.
Definition synaptic_element.h:195
~SynapticElement()
Definition synaptic_element.h:103
void set(const Dictionary &d)
Set values from a dictionary.
Definition synaptic_element.cpp:109
double tau_vacant_
Definition synaptic_element.h:243
void set_growth_curve(GrowthCurve &g)
Used to define the dynamics of the synaptic elements using a Growth Curve.
Definition synaptic_element.h:182
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33