Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
EulerTrace.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 EULERTRACE_H_
27 #define EULERTRACE_H_
28 
29 #include "Trace.h"
30 #include "auryn_definitions.h"
31 
32 namespace auryn {
33 
43 class EulerTrace : public Trace
44 {
45 private:
46  typedef Trace super;
48  AurynStateVector * target_ptr;
49 
51  AurynStateVector * temp;
52 
54  AurynFloat scale_const;
55 
57  AurynFloat mul_follow;
58 
59  void init(NeuronID n, AurynFloat timeconstant);
60  void free();
61 
65  void check_size(NeuronID x)
66  {
67 #ifndef NDEBUG
68  if ( x >= size ) {
70  }
71 #endif
72  };
73 
74 public:
76  EulerTrace(NeuronID n, AurynFloat timeconstant);
78  virtual ~EulerTrace();
79 
81  void evolve();
82 
84  void set_timeconstant( AurynFloat timeconstant );
85 
87  void set_target( AurynStateVector * target );
88 
90  void follow();
91 };
92 
93 } // namespace
94 
95 #endif /*EULERTRACE_H_*/
96 
void follow()
Definition: EulerTrace.cpp:71
virtual ~EulerTrace()
Definition: EulerTrace.cpp:46
Solves a set of identical linear differential equations with the Euler method. It is used to implemen...
Definition: EulerTrace.h:43
void set_timeconstant(AurynFloat timeconstant)
Definition: EulerTrace.cpp:51
EulerTrace(NeuronID n, AurynFloat timeconstant)
Definition: EulerTrace.cpp:41
Abstract base class of synaptic traces.
Definition: Trace.h:36
int n
Definition: mkpat.py:5
NeuronID size
Size of the vector.
Definition: AurynVector.h:151
Definition: ABSConnection.h:38
void set_target(AurynStateVector *target)
Definition: EulerTrace.cpp:58
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Definition: auryn_definitions.h:306
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
void evolve()
Definition: EulerTrace.cpp:66
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151