Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
ProfilePoissonGroup.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 PROFILEPOISSONGROUP_H_
27 #define PROFILEPOISSONGROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "System.h"
32 #include "SpikingGroup.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 
55 {
56 private:
57  AurynTime * clk;
58  AurynDouble lambda;
59 
60 
61  void init(AurynDouble rate);
62 
63 protected:
66 
67  static boost::mt19937 gen;
68  boost::uniform_01<> * dist;
69  boost::variate_generator<boost::mt19937&, boost::uniform_01<> > * die;
70 
72 
73 public:
79 
81  virtual ~ProfilePoissonGroup();
82 
84  virtual void evolve();
85 
91  void set_rate(AurynDouble rate);
92 
93  void normalize_profile();
94 
98  void set_profile(AurynFloat * newprofile);
99 
106  void set_profile(auryn_vector_float * newprofile);
107 
108  void set_flat_profile();
109  void set_gaussian_profile(AurynDouble mean, AurynDouble sigma, AurynDouble floor=0.0);
110 
113 
115  void seed(int s);
116 };
117 
118 }
119 
120 #endif /*NEURONGROUP_H_*/
void set_flat_profile()
Definition: ProfilePoissonGroup.cpp:97
void set_gaussian_profile(AurynDouble mean, AurynDouble sigma, AurynDouble floor=0.0)
Definition: ProfilePoissonGroup.cpp:132
auryn_vector_float * profile
stores the spatial distribution of relative firing rates
Definition: ProfilePoissonGroup.h:71
AurynDouble jumpsize
Definition: ProfilePoissonGroup.h:65
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
boost::uniform_01 * dist
Definition: ProfilePoissonGroup.h:68
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
int n
Definition: mkpat.py:5
virtual void evolve()
Definition: ProfilePoissonGroup.cpp:157
void set_rate(AurynDouble rate)
Definition: ProfilePoissonGroup.cpp:67
Definition: ABSConnection.h:38
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
static boost::mt19937 gen
Definition: ProfilePoissonGroup.h:67
NeuronID x
Definition: ProfilePoissonGroup.h:64
void normalize_profile()
Definition: ProfilePoissonGroup.cpp:84
ProfilePoissonGroup(NeuronID n, AurynDouble rate=5.)
Definition: ProfilePoissonGroup.cpp:54
AurynDouble get_rate()
Definition: ProfilePoissonGroup.cpp:151
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
NeuronID AurynTime
Defines Auryns discrete time unit of the System clock. Change to AurynLong if 120h of simtime are not...
Definition: auryn_definitions.h:155
void seed(int s)
Definition: ProfilePoissonGroup.cpp:172
void set_profile(AurynFloat *newprofile)
Definition: ProfilePoissonGroup.cpp:104
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
boost::variate_generator< boost::mt19937 &, boost::uniform_01<> > * die
Definition: ProfilePoissonGroup.h:69
A SpikingGroup that creates poissonian spikes with a given rate and spatial profile.
Definition: ProfilePoissonGroup.h:54
virtual ~ProfilePoissonGroup()
Definition: ProfilePoissonGroup.cpp:59