Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
WeightChecker.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 WEIGHTCHECKER_H_
27 #define WEIGHTCHECKER_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "System.h"
32 #include "Checker.h"
33 #include "Connection.h"
34 
35 namespace auryn {
36 
42 class WeightChecker : public Checker
43 {
44 private:
45  AurynWeight wmin;
46  AurynWeight wmax;
47  AurynTime timestep_;
48  Connection * source_;
49  void init(Connection * source, AurynFloat min, AurynFloat max, AurynFloat timestep);
50 
51 public:
57  WeightChecker(Connection * source, AurynFloat max);
66  WeightChecker(Connection * source, AurynFloat min, AurynFloat max, AurynFloat timestep=10.0);
67  virtual ~WeightChecker();
69  virtual bool propagate();
70 };
71 
72 }
73 
74 #endif /*WEIGHTCHECKER_H_*/
The abstract base class for all Connection objects in Auryn.
Definition: Connection.h:53
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
Definition: ABSConnection.h:38
virtual bool propagate()
Definition: WeightChecker.cpp:61
WeightChecker(Connection *source, AurynFloat max)
The default constructor.
Definition: WeightChecker.cpp:30
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
The abstract base class for all checkers.
Definition: Checker.h:47
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
A Checker class that tracks the meain weight of a Connection and breaks a run if it goes out of bound...
Definition: WeightChecker.h:42
virtual ~WeightChecker()
Definition: WeightChecker.cpp:40