Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
LinearTrace.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 LINEARTRACE_H_
27 #define LINEARTRACE_H_
28 
29 #include "auryn_definitions.h"
30 #include "auryn_global.h"
31 #include "EulerTrace.h"
32 
33 namespace auryn {
34 
35 
42 class LinearTrace : public EulerTrace
43 {
44 private:
45  typedef EulerTrace super;
46  AurynTime tau_auryntime;
47  AurynTime zerointerval;
48  AurynTime * timestamp;
49  AurynTime * clock;
50  void init(NeuronID n, AurynFloat timeconstant);
51  void free();
52 
53 public:
54  /* \brief Default constructor */
55  LinearTrace(NeuronID n, AurynFloat timeconstant);
56  /* \brief Test constructor which allows to init the class without Auryn kernel
57  *
58  * This is only used in tests and should not be used in a simulation. */
59  LinearTrace(NeuronID n, AurynFloat timeconstant, AurynTime * clk);
60  virtual ~LinearTrace();
61  void inc(NeuronID i);
62  void add_specific(NeuronID i, AurynState amount);
63  AurynFloat get(NeuronID i);
64  void update(NeuronID i);
65  void evolve();
66 };
67 
68 }
69 
70 
71 #endif /*LINEARTRACE_H_*/
72 
void add_specific(NeuronID i, AurynState amount)
Definition: LinearTrace.cpp:76
void inc(NeuronID i)
Increment given trace by 1.
Definition: LinearTrace.cpp:82
Solves a set of identical linear differential equations with the Euler method. It is used to implemen...
Definition: EulerTrace.h:43
virtual ~LinearTrace()
Definition: LinearTrace.cpp:56
void evolve()
Definition: LinearTrace.cpp:95
int n
Definition: mkpat.py:5
Definition: ABSConnection.h:38
AurynFloat AurynState
Type for Auryn state variables (default single precision since it needs to be compatible with auryn_v...
Definition: auryn_definitions.h:160
Exponential synaptic trace which exactly solves in an event-based manner in non-follow scenarios...
Definition: LinearTrace.h:42
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
LinearTrace(NeuronID n, AurynFloat timeconstant)
Definition: LinearTrace.cpp:44
void update(NeuronID i)
Definition: LinearTrace.cpp:62
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
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151