Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
PairInteractionConnection.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 
21 #ifndef PAIRINTERACTIONCONNECTION_H_
22 #define PAIRINTERACTIONCONNECTION_H_
23 
24 #define PAIRINTERACTIONCON_WINDOW_MAX_SIZE 10000 //< Maximum STDP window size in auryn_timestep
25 
26 #include "auryn_definitions.h"
27 #include "AurynVector.h"
28 #include "DuplexConnection.h"
29 
30 namespace auryn {
31 
32 
42 {
43 
44 private:
45 
46  void init(AurynWeight maxw);
47  void free();
48 
49 protected:
51 
54 
55  inline AurynWeight dw_fwd(NeuronID post);
56  inline AurynWeight dw_bkw(NeuronID pre);
57 
58  inline void propagate_forward();
59  inline void propagate_backward();
60 
61 
62 public:
65 
68 
69  PairInteractionConnection(SpikingGroup * source, NeuronGroup * destination,
70  const char * filename,
71  AurynWeight maxweight=1. , TransmitterType transmitter=GLUT);
72 
74  PairInteractionConnection(SpikingGroup * source, NeuronGroup * destination,
75  AurynWeight weight, AurynFloat sparseness=0.05,
76  AurynWeight maxweight=1. , TransmitterType transmitter=GLUT, string name="PairInteractionConnection");
77 
80 
81 
88  void load_window_from_file( const char * filename , double scale = 1. );
89 
97  void set_exponential_window ( double Aplus = 1e-3, double tau_plus = 20e-3, double Aminus = -1e-3, double tau_minus = 20e-3);
98 
106  void set_floor_terms( double pre_post = 0.0, double post_pre = 0.0 );
107 
108  virtual void propagate();
109 
110 };
111 
112 }
113 
114 #endif /*PAIRINTERACTIONCONNECTION_H_*/
PairInteractionConnection(SpikingGroup *source, NeuronGroup *destination, const char *filename, AurynWeight maxweight=1., TransmitterType transmitter=GLUT)
Definition: PairInteractionConnection.cpp:72
STDP Connection class to simulate arbitrary nearest-neighbor STDP windows.
Definition: PairInteractionConnection.h:41
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
AurynWeight dw_fwd(NeuronID post)
Definition: PairInteractionConnection.cpp:93
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
AurynFloat * window_pre_post
Definition: PairInteractionConnection.h:63
void load_window_from_file(const char *filename, double scale=1.)
Loads STDP windows for pre-post and post-pre from ASCII file.
Definition: PairInteractionConnection.cpp:172
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
AurynFloat * window_post_pre
Definition: PairInteractionConnection.h:64
virtual void propagate()
Internally used propagate method.
Definition: PairInteractionConnection.cpp:165
void propagate_forward()
Definition: PairInteractionConnection.cpp:109
AurynWeight dw_bkw(NeuronID pre)
Definition: PairInteractionConnection.cpp:101
AurynWeight w_max
Definition: PairInteractionConnection.h:50
virtual ~PairInteractionConnection()
Default destructor.
Definition: PairInteractionConnection.cpp:88
void propagate_backward()
Definition: PairInteractionConnection.cpp:140
void set_exponential_window(double Aplus=1e-3, double tau_plus=20e-3, double Aminus=-1e-3, double tau_minus=20e-3)
Sets STDP window to be bi-exponential.
Definition: PairInteractionConnection.cpp:250
Definition: ABSConnection.h:38
AurynTime * last_spike_pre
Definition: PairInteractionConnection.h:52
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
bool stdp_active
Switches stdp on or off.
Definition: PairInteractionConnection.h:67
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
void set_floor_terms(double pre_post=0.0, double post_pre=0.0)
Sets "floor" terms for STDP rule.
Definition: PairInteractionConnection.cpp:264
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
AurynTime * last_spike_post
Definition: PairInteractionConnection.h:53
Duplex connection is the base class of most plastic connections.
Definition: DuplexConnection.h:54
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151