Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
CubaIFGroup.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 CUBAIFGROUP_H_
27 #define CUBAIFGROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "NeuronGroup.h"
32 #include "System.h"
33 
34 
35 
36 namespace auryn {
37 
46 class CubaIFGroup : public NeuronGroup
47 {
48 private:
49  auryn_vector_float * bg_current;
50  auryn_vector_ushort * ref;
51  unsigned short refractory_time;
52  AurynFloat e_rest,thr,tau_mem;
53  AurynFloat scale_mem;
54 
55  AurynFloat * t_bg_cur;
56  AurynFloat * t_mem;
57  unsigned short * t_ref;
58 
59  void init();
60  void calculate_scale_constants();
61  inline void integrate_state();
62  inline void check_thresholds();
63  virtual std::string get_output_line(NeuronID i);
64  virtual void load_input_line(NeuronID i, const char * buf);
65 public:
68  virtual ~CubaIFGroup();
69 
71  void set_bg_current(NeuronID i, AurynFloat current);
72 
74  void set_all_bg_currents( AurynFloat current );
75 
78 
82  void set_tau_mem(AurynFloat taum);
84  void clear();
86  void evolve();
87 };
88 
89 }
90 
91 #endif /*CUBAIFGROUP_H_*/
92 
void set_tau_mem(AurynFloat taum)
Definition: CubaIFGroup.cpp:117
Current based neuron model with absolute refractoriness as used in Vogels and Abbott 2005...
Definition: CubaIFGroup.h:46
Default Auryn vector template.
Definition: auryn_definitions.h:327
void set_all_bg_currents(AurynFloat current)
Definition: CubaIFGroup.cpp:112
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
void set_refractory_period(AurynDouble t)
Definition: CubaIFGroup.cpp:150
void clear()
Definition: CubaIFGroup.cpp:64
virtual ~CubaIFGroup()
Definition: CubaIFGroup.cpp:75
AurynFloat get_bg_current(NeuronID i)
Definition: CubaIFGroup.cpp:123
Definition: ABSConnection.h:38
CubaIFGroup(NeuronID size)
Definition: CubaIFGroup.cpp:30
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
void set_bg_current(NeuronID i, AurynFloat current)
Definition: CubaIFGroup.cpp:107
NeuronID size
Stores the size of the group.
Definition: SpikingGroup.h:119
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void evolve()
Definition: CubaIFGroup.cpp:83