Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
TIFGroup.h
Go to the documentation of this file.
1 /*
2 * Copyright 2014-2018 Friedemann Zenke
3 *
4 * This file is part of Auryn, a simulation package for plastic
5 * spiking neural networks.
6 *
7 * Auryn is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * Auryn is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Auryn. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * If you are using Auryn or parts of it for your work please cite:
21 * Zenke, F. and Gerstner, W., 2014. Limits to high-speed simulations
22 * of spiking neural networks using general-purpose computers.
23 * Front Neuroinform 8, 76. doi: 10.3389/fninf.2014.00076
24 */
25 
26 #ifndef TIFGROUP_H_
27 #define TIFGROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "NeuronGroup.h"
32 #include "System.h"
33 
34 namespace auryn {
35 
38 class TIFGroup : public NeuronGroup
39 {
40 private:
41  auryn_vector_float * bg_current;
42  auryn_vector_ushort * ref;
43  unsigned short refractory_time;
44  AurynFloat e_rest,e_rev_gaba,thr,tau_mem, r_mem, c_mem;
45  AurynFloat tau_ampa,tau_gaba;
46  AurynFloat scale_ampa, scale_gaba, scale_mem;
47 
48  AurynFloat * t_g_ampa;
49  AurynFloat * t_g_gaba;
50  AurynFloat * t_bg_cur;
51  AurynFloat * t_mem;
52  unsigned short * t_ref;
53 
54  void init();
55  void calculate_scale_constants();
56  inline void integrate_state();
57  inline void check_thresholds();
58  virtual string get_output_line(NeuronID i);
59  virtual void load_input_line(NeuronID i, const char * buf);
60 
61  void virtual_serialize(boost::archive::binary_oarchive & ar, const unsigned int version );
62  void virtual_serialize(boost::archive::binary_iarchive & ar, const unsigned int version );
63 public:
66  virtual ~TIFGroup();
67 
69  void set_bg_current(NeuronID i, AurynFloat current);
70 
72  void set_bg_currents(AurynFloat current);
73 
76 
79 
81  void set_tau_mem(AurynFloat taum);
82 
84  void set_r_mem(AurynFloat rm);
85 
87  void set_c_mem(AurynFloat cm);
88 
90  void set_tau_ampa(AurynFloat tau);
91 
94 
96  void set_tau_gaba(AurynFloat tau);
97 
100 
102  void clear();
103 
107  void evolve();
108 };
109 
110 }
111 
112 #endif /*TIFGROUP_H_*/
113 
Default Auryn vector template.
Definition: auryn_definitions.h:327
AurynFloat get_tau_gaba()
Gets the exponential time constant for the GABA channel.
Definition: TIFGroup.cpp:199
void set_tau_gaba(AurynFloat tau)
Sets the exponential time constant for the GABA channel (default 10ms)
Definition: TIFGroup.cpp:193
void set_bg_currents(AurynFloat current)
Controls the constant current input to all neurons.
Definition: TIFGroup.cpp:126
void set_c_mem(AurynFloat cm)
Sets the membrane capacitance (default 200pF)
Definition: TIFGroup.cpp:144
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
Definition: ABSConnection.h:38
void evolve()
Integrates the NeuronGroup state.
Definition: TIFGroup.cpp:91
AurynFloat get_bg_current(NeuronID i)
Gets the current background current value for neuron i.
Definition: TIFGroup.cpp:151
AurynFloat get_tau_ampa()
Gets the exponential time constant for the AMPA channel.
Definition: TIFGroup.cpp:188
virtual ~TIFGroup()
Definition: TIFGroup.cpp:83
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Conductance based LIF neuron model with absolute refractoriness as used in Vogels and Abbott 2005...
Definition: TIFGroup.h:38
void set_tau_mem(AurynFloat taum)
Sets the membrane time constant (default 20ms)
Definition: TIFGroup.cpp:131
void set_bg_current(NeuronID i, AurynFloat current)
Controls the constant current input (per default set so zero) to neuron i.
Definition: TIFGroup.cpp:121
NeuronID size
Stores the size of the group.
Definition: SpikingGroup.h:119
void set_tau_ampa(AurynFloat tau)
Sets the exponential time constant for the AMPA channel (default 5ms)
Definition: TIFGroup.cpp:182
TIFGroup(NeuronID size)
The default constructor of this NeuronGroup.
Definition: TIFGroup.cpp:30
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
void clear()
Resets all neurons to defined and identical initial state.
Definition: TIFGroup.cpp:70
void set_refractory_period(AurynDouble t)
Setter for refractory time [s].
Definition: TIFGroup.cpp:204
void set_r_mem(AurynFloat rm)
Sets the membrane resistance (default 100 M-ohm)
Definition: TIFGroup.cpp:137
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151