NEST main@caf0ae8
 
Loading...
Searching...
No Matches
iaf_propagator.h
Go to the documentation of this file.
1/*
2 * iaf_propagator.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 IAF_PROPAGATOR_H
24#define IAF_PROPAGATOR_H
25
26// C++ includes:
27#include <cmath>
28#include <tuple>
29
30// Includes from libnestutil:
31#include "numerics.h"
32
33
44{
45public:
50
56 IAFPropagator( double tau_syn, double tau_m, double c_m );
57
58protected:
66 static constexpr double NUMERICAL_STABILITY_FACTOR_ = 1e-7;
67
79 std::tuple< double, double, double, double > evaluate_P32_( double h ) const;
80
81 double tau_syn_;
82 double tau_m_;
83 double c_m_;
84
86
87 double beta_;
88 double gamma_;
89
90 double inv_tau_syn_;
91 double inv_tau_m_;
92 double inv_c_m_;
93 double inv_beta_;
94};
95
96
101{
102public:
107
113 IAFPropagatorExp( double tau_syn, double tau_m, double c_m );
114
121 double evaluate( double h ) const;
122};
123
128{
129public:
134
140 IAFPropagatorAlpha( double tau_syn, double tau_m, double c_m );
141
148 std::tuple< double, double > evaluate( double h ) const;
149};
150
151
152inline double
154{
155 double P32;
156 std::tie( P32, std::ignore, std::ignore, std::ignore ) = evaluate_P32_( h );
157
158 return P32;
159}
160
161#endif
Exact integration voltage propagator for models with alpha psc.
Definition iaf_propagator.h:128
std::tuple< double, double > evaluate(double h) const
Calculate propagator mapping I_syn and dI_syn to V_m for given time step.
Definition iaf_propagator.cpp:95
IAFPropagatorAlpha()
Empty constructor needed for initialization of buffers.
Definition iaf_propagator.cpp:85
Exact integration voltage propagator for models with exponential psc.
Definition iaf_propagator.h:101
IAFPropagatorExp()
Empty constructor needed for initialization of buffers.
Definition iaf_propagator.cpp:76
double evaluate(double h) const
Calculate propagator mapping I_syn to V_m for given time step.
Definition iaf_propagator.h:153
Exact integration voltage propagator for leaky integrate-and-fire models.
Definition iaf_propagator.h:44
IAFPropagator()
Empty constructor needed for initialization of buffers.
Definition iaf_propagator.cpp:27
double c_m_
Membrane capacitance in pF.
Definition iaf_propagator.h:83
double inv_beta_
1 / beta
Definition iaf_propagator.h:93
double gamma_
beta_ / c_m
Definition iaf_propagator.h:88
double h_min_regular_
Smallest h for which regular P31 case applies.
Definition iaf_propagator.h:85
double inv_c_m_
1 / c_m
Definition iaf_propagator.h:92
std::tuple< double, double, double, double > evaluate_P32_(double h) const
Compute propagator connecting I_syn to V_m and auxiliary quantities for given time interval.
Definition iaf_propagator.cpp:57
double tau_m_
Membrane time constant in ms.
Definition iaf_propagator.h:82
double beta_
(tau_syn * tau_m) / (tau_m - tau_syn)
Definition iaf_propagator.h:87
double inv_tau_m_
1 / tau_m
Definition iaf_propagator.h:91
double inv_tau_syn_
1 / tau_syn
Definition iaf_propagator.h:90
static constexpr double NUMERICAL_STABILITY_FACTOR_
Scale factor for singularity test for P31 computation.
Definition iaf_propagator.h:66
double tau_syn_
Time constant of synaptic current in ms.
Definition iaf_propagator.h:81