Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
DelayConnection.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 DELAYCONNECTION_H_
27 #define DELAYCONNECTION_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "SparseConnection.h"
32 #include "SpikeDelay.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 #include <boost/serialization/vector.hpp>
40 #include <boost/serialization/map.hpp>
41 
42 #include <boost/archive/text_oarchive.hpp>
43 #include <boost/archive/text_iarchive.hpp>
44 #include <boost/archive/binary_oarchive.hpp>
45 #include <boost/archive/binary_iarchive.hpp>
46 
47 namespace auryn {
48 
61 {
62 private:
63  SpikeDelay * src_dly;
64 
65  void init();
66  void free();
67 
68 protected:
69  void virtual_serialize(boost::archive::binary_oarchive & ar, const unsigned int version )
70  {
72  ar & *src_dly;
73  }
74 
75  void virtual_serialize(boost::archive::binary_iarchive & ar, const unsigned int version )
76  {
78  ar & *src_dly;
79  }
80 
81 public:
85  DelayConnection(NeuronID rows, NeuronID cols);
86 
89  SpikingGroup * source,
90  NeuronGroup * destination,
91  AurynWeight weight,
92  AurynFloat sparseness=0.05,
93  TransmitterType transmitter=GLUT,
94  string name="DelayConnection");
95 
97  virtual ~DelayConnection();
98 
99 
101  virtual void propagate();
102 
105  void set_delay_steps(unsigned int delay);
106 
109  void set_delay(double delay=1e-3);
110 };
111 
112 }
113 
114 #endif /*DELAYCONNECTION_H_*/
virtual void propagate()
The required virtual propagate function for propagating spikes.
Definition: DelayConnection.cpp:67
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
void set_delay(double delay=1e-3)
Sets the delay in in units of seconds which is added to all spikes from the src group.
Definition: DelayConnection.cpp:94
void set_delay_steps(unsigned int delay)
Sets the delay in in units of auryn_timestep which is added to all spikes from the src group...
Definition: DelayConnection.cpp:87
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
DelayConnection(NeuronID rows, NeuronID cols)
The bare constructor for manual filling and constructing DelayConnection objects. ...
Definition: DelayConnection.cpp:31
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
Delay object for spikes which is synchronized between nodes using the SyncBuffer formalism implemente...
Definition: SpikeDelay.h:47
The base class to create sparse random connections.
Definition: SparseConnection.h:66
void virtual_serialize(boost::archive::binary_oarchive &ar, const unsigned int version)
Definition: DelayConnection.h:69
void virtual_serialize(boost::archive::binary_iarchive &ar, const unsigned int version)
Definition: DelayConnection.h:75
Definition: ABSConnection.h:38
void virtual_serialize(boost::archive::binary_oarchive &ar, const unsigned int version)
Definition: SparseConnection.h:78
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
virtual ~DelayConnection()
The default destructor.
Definition: DelayConnection.cpp:46
DelayConnection implements a SparseConnection with adjustable delays.
Definition: DelayConnection.h:60
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151