Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
NeuronGroup.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 NEURONGROUP_H_
27 #define NEURONGROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "SpikingGroup.h"
32 
33 #include <map>
34 
35 #include <fstream>
36 #include <sstream>
37 
38 namespace auryn {
39 
45 class NeuronGroup : public SpikingGroup
46 {
47 protected:
48 
49 
52 
54  void init();
55 
57  void free();
58 
59 
60 
61 
62 public:
71 
76 
79 
82  NeuronGroup( NeuronID n, double loadmultiplier, NeuronID total );
83 
85  virtual ~NeuronGroup();
86 
87  virtual void clear() = 0;
88 
98  void set_state(std::string name, AurynState val);
99 
106  void set_state(std::string name, NeuronID i, AurynState val);
107 
110 
113 
114 
115  void random_mem(AurynState mean=-60e-3, AurynState sigma=5e-3);
116 
117  virtual void init_state();
118 
119  void safe_tadd(NeuronID id, AurynWeight amount, TransmitterType t=GLUT);
121  void tadd(NeuronID id, AurynWeight amount, TransmitterType t=GLUT);
122 
124  void tadd(AurynStateVector * state, NeuronID id, AurynWeight amount);
125 
126 };
127 
128 }
129 
130 #endif /*NEURONGROUP_H_*/
Tries to make a smart choice.
Definition: SpikingGroup.h:51
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
void init()
Definition: NeuronGroup.cpp:41
void random_mem(AurynState mean=-60e-3, AurynState sigma=5e-3)
Definition: NeuronGroup.cpp:81
virtual ~NeuronGroup()
Definition: NeuronGroup.cpp:75
virtual AurynStateVector * get_default_inh_target()
Returns default inh target input.
Definition: NeuronGroup.cpp:144
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
void set_state(std::string name, AurynState val)
Conveniently sets all values in a state vector identified by name in this group.
Definition: NeuronGroup.cpp:132
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
int n
Definition: mkpat.py:5
virtual AurynStateVector * get_default_exc_target()
Returns default exc target input.
Definition: NeuronGroup.cpp:139
AurynStateVector * g_ampa
Definition: NeuronGroup.h:66
AurynStateVector * default_inh_target_state
Definition: NeuronGroup.h:51
NeuronGroup(NeuronID n, NodeDistributionMode mode=AUTO)
Default constructor.
Definition: NeuronGroup.cpp:36
Definition: ABSConnection.h:38
AurynStateVector * default_exc_target_state
Definition: NeuronGroup.h:50
AurynFloat AurynState
Type for Auryn state variables (default single precision since it needs to be compatible with auryn_v...
Definition: auryn_definitions.h:160
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
void free()
Definition: NeuronGroup.cpp:70
virtual void init_state()
Definition: NeuronGroup.cpp:93
AurynStateVector * g_nmda
Definition: NeuronGroup.h:70
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
void safe_tadd(NeuronID id, AurynWeight amount, TransmitterType t=GLUT)
Definition: NeuronGroup.cpp:87
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
AurynStateVector * g_gaba
Definition: NeuronGroup.h:68
AurynStateVector * mem
Definition: NeuronGroup.h:64
virtual void clear()=0
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
AurynStateVector * thr
Definition: NeuronGroup.h:75
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void tadd(NeuronID id, AurynWeight amount, TransmitterType t=GLUT)
Definition: NeuronGroup.cpp:98
NodeDistributionMode
Specifies howto distribute different neurons across ranks when simulation is run in parallel...
Definition: SpikingGroup.h:50