Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
MinimalTripletConnection.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 MINIMALTRIPLETCONNECTION_H_
27 #define MINIMALTRIPLETCONNECTION_H_
28 
29 #include "auryn_definitions.h"
30 #include "DuplexConnection.h"
31 #include "EulerTrace.h"
32 #include "LinearTrace.h"
33 #include "SpikeDelay.h"
34 
35 #define TRACE EulerTrace
36 
37 
38 namespace auryn {
39 
44 {
45 
46 private:
47  void virtual_serialize(boost::archive::binary_oarchive & ar, const unsigned int version )
48  {
50  ar & *w;
51  }
52 
53  void virtual_serialize(boost::archive::binary_iarchive & ar, const unsigned int version )
54  {
56  ar & *w;
57  }
58 
59  void init(AurynFloat eta, AurynFloat maxweight);
60  void init_shortcuts();
61 
62 protected:
63 
67 
68 
71 
74 
75 
76  /* Definitions of presynaptic traces */
78 
79  /* Definitions of postsynaptic traces */
82 
83  void propagate_forward();
84  void propagate_backward();
85  void sort_spikes();
86 
92 
100 
101 
102 public:
106 
107 
110 
111  MinimalTripletConnection(SpikingGroup * source, NeuronGroup * destination,
112  TransmitterType transmitter=GLUT);
113 
117  SpikingGroup * source,
118  NeuronGroup * destination,
119  const char * filename,
120  AurynFloat eta=1,
121  AurynFloat maxweight=1. ,
122  TransmitterType transmitter=GLUT);
123 
135  SpikingGroup * source,
136  NeuronGroup * destination,
137  AurynWeight weight,
138  AurynFloat sparseness=0.05,
139  AurynFloat eta=1.0,
140  AurynFloat maxweight=1.0,
141  TransmitterType transmitter=GLUT,
142  string name = "MinimalTripletConnection" );
143 
144  virtual ~MinimalTripletConnection();
145  virtual void finalize();
146  void free();
147 
148 
149  virtual void propagate();
150  virtual void evolve();
151 
152 };
153 
154 }
155 
156 #endif /*MINIMALTRIPLETCONNECTION_H_*/
void propagate_forward()
Definition: MinimalTripletConnection.cpp:149
virtual ~MinimalTripletConnection()
Definition: MinimalTripletConnection.cpp:122
#define PRE_TRACE_MODEL
Definition: auryn_definitions.h:96
AurynWeight ** bkw_data
Definition: MinimalTripletConnection.h:73
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
NeuronID * bkw_ind
Definition: MinimalTripletConnection.h:72
AurynFloat tau_long
Definition: MinimalTripletConnection.h:66
ForwardMatrix * w
A pointer that points per default to the ComplexMatrix that stores the connectinos.
Definition: SparseConnection.h:147
AurynFloat A3_plus
Definition: MinimalTripletConnection.h:103
AurynWeight * fwd_data
Definition: MinimalTripletConnection.h:70
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
NeuronID * fwd_ind
Definition: MinimalTripletConnection.h:69
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
Implements minimal triplet STDP as described by Pfister and Gerstner 2006.
Definition: MinimalTripletConnection.h:43
virtual void evolve()
Evolve method to update internal connection state. Called by System run method.
Definition: MinimalTripletConnection.cpp:213
Definition: ABSConnection.h:38
DEFAULT_TRACE_MODEL * tr_post2
Definition: MinimalTripletConnection.h:81
void virtual_serialize(boost::archive::binary_oarchive &ar, const unsigned int version)
Definition: SparseConnection.h:78
AurynFloat tau_plus
Definition: MinimalTripletConnection.h:64
AurynFloat tau_minus
Definition: MinimalTripletConnection.h:65
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
void propagate_backward()
Definition: MinimalTripletConnection.cpp:176
PRE_TRACE_MODEL * tr_pre
Definition: MinimalTripletConnection.h:77
#define DEFAULT_TRACE_MODEL
These precompiler directives are deprecated and should not be used any more.
Definition: auryn_definitions.h:95
AurynWeight dw_pre(NeuronID post)
Definition: MinimalTripletConnection.cpp:130
AurynFloat A2_minus
Definition: MinimalTripletConnection.h:104
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
AurynWeight dw_post(NeuronID pre, NeuronID post)
Definition: MinimalTripletConnection.cpp:140
MinimalTripletConnection(SpikingGroup *source, NeuronGroup *destination, TransmitterType transmitter=GLUT)
Definition: MinimalTripletConnection.cpp:82
bool stdp_active
Definition: MinimalTripletConnection.h:109
void free()
Definition: MinimalTripletConnection.cpp:78
Duplex connection is the base class of most plastic connections.
Definition: DuplexConnection.h:54
DEFAULT_TRACE_MODEL * tr_post
Definition: MinimalTripletConnection.h:80
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
AurynFloat A2_plus
Definition: MinimalTripletConnection.h:105
virtual void propagate()
Internally used propagate method.
Definition: MinimalTripletConnection.cpp:207
virtual void finalize()
Finalizes connection after random or manual initialization of the weights.
Definition: MinimalTripletConnection.cpp:73