Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
InputChannelGroup.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 INPUTCHANNELGROUP_H_
27 #define INPUTCHANNELGROUP_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 chsize );
60 
61 protected:
63 
65 
68 
70  int offset;
72 
75 
78 
79 public:
84 
92  AurynDouble rate=5.,
93  NeuronID chsize=100
94  );
95  virtual ~InputChannelGroup();
96  virtual void evolve();
97  void set_rate(AurynDouble rate);
98  void set_timescale(AurynDouble scale);
99  void set_offset(int off);
100 
101  void set_means(AurynDouble m);
102  void set_mean(NeuronID channel, AurynDouble m);
103 
104  void set_amplitudes(AurynDouble amp);
105  void set_amplitude(NeuronID channel, AurynDouble amp);
106 
107  void set_stoptime(AurynDouble stoptime);
109  void seed();
110 };
111 
112 }
113 
114 #endif /*INPUTCHANNELGROUP_H_*/
AurynTime tstop
Definition: InputChannelGroup.h:64
AurynDouble * o
Definition: InputChannelGroup.h:74
NeuronID nb_channels
Definition: InputChannelGroup.h:67
void set_offset(int off)
Definition: InputChannelGroup.cpp:174
AurynDouble get_rate()
Definition: InputChannelGroup.cpp:108
InputChannelGroup(NeuronID n, AurynDouble rate=5., NeuronID chsize=100)
Definition: InputChannelGroup.cpp:83
void set_rate(AurynDouble rate)
Definition: InputChannelGroup.cpp:103
void set_timescale(AurynDouble scale)
Definition: InputChannelGroup.cpp:168
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
void seed()
Definition: InputChannelGroup.cpp:142
A PoissonGroup with multiple subpopulations that co-modulate their firing rate according to an Ornste...
Definition: InputChannelGroup.h:48
AurynTime delay
Definition: InputChannelGroup.h:71
int n
Definition: mkpat.py:5
NeuronID channelsize
Definition: InputChannelGroup.h:66
void set_amplitude(NeuronID channel, AurynDouble amp)
Definition: InputChannelGroup.cpp:158
AurynDouble * means
Array for OU process means.
Definition: InputChannelGroup.h:83
void set_mean(NeuronID channel, AurynDouble m)
Definition: InputChannelGroup.cpp:148
void set_amplitudes(AurynDouble amp)
Definition: InputChannelGroup.cpp:163
AurynDouble lambda
Definition: InputChannelGroup.h:62
Definition: ABSConnection.h:38
NeuronID * x
Definition: InputChannelGroup.h:77
AurynDouble * amplitudes
Array for OU process amplitudes.
Definition: InputChannelGroup.h:81
virtual ~InputChannelGroup()
Definition: InputChannelGroup.cpp:90
int offset
Definition: InputChannelGroup.h:70
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
virtual void evolve()
Virtual pure evolve function which needs to be implemented by derived classes.
Definition: InputChannelGroup.cpp:114
AurynDouble timescale
Definition: InputChannelGroup.h:69
void set_stoptime(AurynDouble stoptime)
Definition: InputChannelGroup.cpp:180
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void set_means(AurynDouble m)
Definition: InputChannelGroup.cpp:153