Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
DuplexConnection.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 DUPLEXCONNECTION_H_
27 #define DUPLEXCONNECTION_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "SparseConnection.h"
32 #include "SimpleMatrix.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 
43 
55 {
56 private:
57  bool allocated_bkw;
58  void init();
59  void free();
60 protected:
61  void compute_reverse_matrix(int z = 0);
62 public:
64  BackwardMatrix * bkw; // TODO make protected again later when tested
65 
66  DuplexConnection(const char * filename);
68  DuplexConnection(SpikingGroup * source, NeuronGroup * destination, TransmitterType transmitter=GLUT);
69  DuplexConnection(SpikingGroup * source, NeuronGroup * destination, const char * filename , TransmitterType transmitter=GLUT);
70  DuplexConnection(SpikingGroup * source, NeuronGroup * destination, AurynWeight weight, AurynFloat sparseness=0.05, TransmitterType transmitter=GLUT, std::string name="DuplexConnection");
71 
72 
73  virtual ~DuplexConnection();
74  virtual void finalize();
75 
77  void prune();
78 
79 };
80 
81 }
82 
83 #endif /*DUPLEXCONNECTION_H_*/
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
virtual ~DuplexConnection()
Definition: DuplexConnection.cpp:104
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
Template for a sparse matrix with row major ordering and fast access of rows.
Definition: SimpleMatrix.h:43
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
DuplexConnection(const char *filename)
Definition: DuplexConnection.cpp:53
The base class to create sparse random connections.
Definition: SparseConnection.h:66
BackwardMatrix * bkw
Definition: DuplexConnection.h:64
Template for a sparse matrix with row major ordering and fast access of rows and capability to store ...
Definition: ComplexMatrix.h:75
void compute_reverse_matrix(int z=0)
Definition: DuplexConnection.cpp:113
Definition: ABSConnection.h:38
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
ForwardMatrix * fwd
Definition: DuplexConnection.h:63
SimpleMatrix< AurynWeight * > BackwardMatrix
Definition: DuplexConnection.h:42
void prune()
Prune weight matrices.
Definition: DuplexConnection.cpp:165
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Duplex connection is the base class of most plastic connections.
Definition: DuplexConnection.h:54
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
virtual void finalize()
Finalizes connection after random or manual initialization of the weights.
Definition: DuplexConnection.cpp:43
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151