Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
CorrelatedPoissonGroup.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 CORRELATEDPOISSONGROUP_H_
27 #define CORRELATEDPOISSONGROUP_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 
49 {
50 private:
51  AurynTime * clk;
52  static boost::mt19937 shared_noise_gen;
53  static boost::mt19937 rank_noise_gen;
54 
55  boost::uniform_01<> * dist;
56  boost::variate_generator<boost::mt19937&, boost::uniform_01<> > * shared_noise;
57  boost::variate_generator<boost::mt19937&, boost::exponential_distribution<> > * rank_noise;
58 
59  void init(AurynDouble rate, NeuronID gsize, AurynDouble timedelay );
60 
61 protected:
63 
65 
69 
71  int offset;
73 
77 
83 
86 
87 public:
97  AurynDouble rate=5.,
98  NeuronID gsize=100,
99  AurynDouble timedelay=50e-3 );
100  virtual ~CorrelatedPoissonGroup();
101  virtual void evolve();
102  void set_rate(AurynDouble rate);
103  void set_amplitude(AurynDouble ampl);
105  void set_tau_amplitude(AurynDouble scale);
106  void set_timescale(AurynDouble scale);
107  void set_offset(int off);
108  void set_threshold(AurynDouble threshold);
109  void set_stoptime(AurynDouble stoptime);
111  void seed();
112 };
113 
114 }
115 
116 #endif /*CORRELATEDPOISSONGROUP_H_*/
int offset
Definition: CorrelatedPoissonGroup.h:71
NeuronID groupsize
Definition: CorrelatedPoissonGroup.h:66
void set_threshold(AurynDouble threshold)
Definition: CorrelatedPoissonGroup.cpp:111
AurynDouble thr
Definition: CorrelatedPoissonGroup.h:82
void set_timescale(AurynDouble scale)
Definition: CorrelatedPoissonGroup.cpp:175
void seed()
Definition: CorrelatedPoissonGroup.cpp:157
AurynDouble tau_amplitude
Definition: CorrelatedPoissonGroup.h:80
void set_stoptime(AurynDouble stoptime)
Definition: CorrelatedPoissonGroup.cpp:193
void set_tau_amplitude(AurynDouble scale)
Definition: CorrelatedPoissonGroup.cpp:181
AurynDouble mean
Definition: CorrelatedPoissonGroup.h:88
void set_target_amplitude(AurynDouble ampl)
Definition: CorrelatedPoissonGroup.cpp:169
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
void set_rate(AurynDouble rate)
Definition: CorrelatedPoissonGroup.cpp:106
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
AurynDouble target_amplitude
Definition: CorrelatedPoissonGroup.h:81
AurynTime tstop
Definition: CorrelatedPoissonGroup.h:64
void set_amplitude(AurynDouble ampl)
Definition: CorrelatedPoissonGroup.cpp:163
AurynDouble * delay_o
Definition: CorrelatedPoissonGroup.h:76
virtual ~CorrelatedPoissonGroup()
Definition: CorrelatedPoissonGroup.cpp:96
void set_offset(int off)
Definition: CorrelatedPoissonGroup.cpp:187
AurynTime delay
Definition: CorrelatedPoissonGroup.h:72
int n
Definition: mkpat.py:5
virtual void evolve()
Virtual pure evolve function which needs to be implemented by derived classes.
Definition: CorrelatedPoissonGroup.cpp:122
NeuronID remainersize
Definition: CorrelatedPoissonGroup.h:67
AurynDouble o
Definition: CorrelatedPoissonGroup.h:75
AurynDouble get_rate()
Definition: CorrelatedPoissonGroup.cpp:116
Definition: ABSConnection.h:38
A PoissonGroup with multiple subpopulations that co-modulate their firing rate according to an Ornste...
Definition: CorrelatedPoissonGroup.h:48
CorrelatedPoissonGroup(NeuronID n, AurynDouble rate=5., NeuronID gsize=100, AurynDouble timedelay=50e-3)
Definition: CorrelatedPoissonGroup.cpp:88
AurynDouble lambda
Definition: CorrelatedPoissonGroup.h:62
NeuronID ngroups
Definition: CorrelatedPoissonGroup.h:68
NeuronID * x
Definition: CorrelatedPoissonGroup.h:85
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
AurynDouble amplitude
Definition: CorrelatedPoissonGroup.h:79
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
AurynDouble timescale
Definition: CorrelatedPoissonGroup.h:70