Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
SRM0Group.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 SRM0GROUP_H_
27 #define SRM0GROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "NeuronGroup.h"
32 #include "System.h"
33 
34 #include <boost/random/mersenne_twister.hpp>
35 #include <boost/random/uniform_int.hpp>
36 #include <boost/random/variate_generator.hpp>
37 #include <boost/random/exponential_distribution.hpp>
38 
39 namespace auryn {
40 
50 class SRM0Group : public NeuronGroup
51 {
52 private:
53  static boost::mt19937 gen;
54  boost::exponential_distribution<> * dist;
55  boost::variate_generator<boost::mt19937&, boost::exponential_distribution<> > * die;
56  unsigned int salt;
57 
58  AurynFloat e_rest,e_rev,thr,tau_mem, tau_syn;
59  AurynFloat scale_mem;
60  AurynFloat scale_syn;
61 
63  AurynStateVector * syn_current;
64 
66  AurynStateVector * warped_lifetime;
67 
69  AurynStateVector * temp;
70 
71  void init();
72  void calculate_scale_constants();
73  inline void integrate_state();
74  inline void check_thresholds();
75 public:
78 
81 
84  virtual ~SRM0Group();
85 
87  void draw(NeuronID i);
88 
90  void draw_all();
91 
93  void set_tau_mem(AurynFloat taum);
94 
96  void clear();
97 
99  void evolve();
100 
102  void seed(unsigned int s);
103 };
104 
105 }
106 
107 #endif /*SRM0GROUP_H_*/
108 
Implements SRM0 neuron model with escape noise.
Definition: SRM0Group.h:50
void draw_all()
Redraws random waiting times for all neurons.
Definition: SRM0Group.cpp:77
AurynFloat rho0
Mean firing rate rate at threshold.
Definition: SRM0Group.h:77
void seed(unsigned int s)
Seed the random number generator of all SRM0Group instances.
Definition: SRM0Group.cpp:142
void evolve()
Definition: SRM0Group.cpp:101
void draw(NeuronID i)
Redraws random waiting times neuron i.
Definition: SRM0Group.cpp:71
Definition: ABSConnection.h:38
virtual ~SRM0Group()
Definition: SRM0Group.cpp:92
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
NeuronID size
Stores the size of the group.
Definition: SpikingGroup.h:119
void clear()
Definition: SRM0Group.cpp:84
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
SRM0Group(NeuronID size)
Definition: SRM0Group.cpp:32
AurynFloat delta_u
Spike sharpness parameter delta u.
Definition: SRM0Group.h:80
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void set_tau_mem(AurynFloat taum)
Definition: SRM0Group.cpp:136